소스 검색

修改task_t实现,以便于将来支持stop_token。

tags/2.9.10
tearshark 4 년 전
부모
커밋
a022d3682b
2개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  1. 2
    2
      tutorial/test_async_when_all.cpp
  2. 4
    2
      vs_proj/librf.vcxproj

+ 2
- 2
tutorial/test_async_when_all.cpp 파일 보기

@@ -206,14 +206,14 @@ void test_when_select()
{
auto dt = rand() % 120;
co_await sleep_for(1ms * dt);
ch1 << (int)dt;
co_await (ch1 << (int)dt);
};
GO
{
auto dt = rand() % 120;
co_await sleep_for(1ms * dt);
ch2 << (int)dt;
co_await (ch2 << (int)dt);
};
this_scheduler()->run_until_notask();

+ 4
- 2
vs_proj/librf.vcxproj 파일 보기

@@ -131,11 +131,13 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<LanguageStandard>stdcpplatest</LanguageStandard>
<StringPooling>true</StringPooling>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<BufferSecurityCheck>false</BufferSecurityCheck>
<DisableSpecificWarnings>4834;4505</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@@ -163,10 +165,10 @@
<EnablePREfast>true</EnablePREfast>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<BufferSecurityCheck>false</BufferSecurityCheck>
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
<DisableSpecificWarnings>4834;4505</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>

Loading…
취소
저장