浏览代码

完成sleep结合event的范例测试

tags/v2.9.7
tearshark 4 年前
父节点
当前提交
65709ca487
共有 3 个文件被更改,包括 6 次插入16 次删除
  1. 1
    1
      tutorial/test_async_channel_mult_thread.cpp
  2. 3
    3
      vs_proj/librf.cpp
  3. 2
    12
      vs_proj/librf.vcxproj

+ 1
- 1
tutorial/test_async_channel_mult_thread.cpp 查看文件

static std::mutex cout_mutex; static std::mutex cout_mutex;
std::atomic<intptr_t> gcounter = 0; std::atomic<intptr_t> gcounter = 0;
#define OUTPUT_DEBUG 0
#define OUTPUT_DEBUG 1
future_t<> test_channel_consumer(const channel_t<std::string> & c, size_t cnt) future_t<> test_channel_consumer(const channel_t<std::string> & c, size_t cnt)
{ {

+ 3
- 3
vs_proj/librf.cpp 查看文件

//resumable_main_mutex(); //resumable_main_mutex();
//resumable_main_event(); //resumable_main_event();
//resumable_main_event_timeout(); //resumable_main_event_timeout();
resumable_main_channel();
//resumable_main_channel();
//resumable_main_channel_mult_thread(); //测试失败!
resumable_main_sleep();
/* /*
resumable_main_benchmark_mem();
if (argc > 1) if (argc > 1)
resumable_main_benchmark_asio_client(atoi(argv[1])); resumable_main_benchmark_asio_client(atoi(argv[1]));
else else
resumable_main_benchmark_asio_server(); resumable_main_benchmark_asio_server();
resumable_main_when_all(); resumable_main_when_all();
resumable_main_sleep();
*/ */
return 0; return 0;

+ 2
- 12
vs_proj/librf.vcxproj 查看文件

</ClCompile> </ClCompile>
<ClCompile Include="..\tutorial\test_async_cb.cpp" /> <ClCompile Include="..\tutorial\test_async_cb.cpp" />
<ClCompile Include="..\tutorial\test_async_channel.cpp" /> <ClCompile Include="..\tutorial\test_async_channel.cpp" />
<ClCompile Include="..\tutorial\test_async_channel_mult_thread.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\tutorial\test_async_channel_mult_thread.cpp" />
<ClCompile Include="..\tutorial\test_async_dynamic_go.cpp" /> <ClCompile Include="..\tutorial\test_async_dynamic_go.cpp" />
<ClCompile Include="..\tutorial\test_async_event.cpp" /> <ClCompile Include="..\tutorial\test_async_event.cpp" />
<ClCompile Include="..\tutorial\test_async_event_timeout.cpp" /> <ClCompile Include="..\tutorial\test_async_event_timeout.cpp" />
<ClCompile Include="..\tutorial\test_async_mutex.cpp" /> <ClCompile Include="..\tutorial\test_async_mutex.cpp" />
<ClCompile Include="..\tutorial\test_async_resumable.cpp" /> <ClCompile Include="..\tutorial\test_async_resumable.cpp" />
<ClCompile Include="..\tutorial\test_async_routine.cpp" /> <ClCompile Include="..\tutorial\test_async_routine.cpp" />
<ClCompile Include="..\tutorial\test_async_sleep.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\tutorial\test_async_sleep.cpp" />
<ClCompile Include="..\tutorial\test_async_suspend_always.cpp" /> <ClCompile Include="..\tutorial\test_async_suspend_always.cpp" />
<ClCompile Include="..\tutorial\test_async_timer.cpp" /> <ClCompile Include="..\tutorial\test_async_timer.cpp" />
<ClCompile Include="..\tutorial\test_async_when_all.cpp"> <ClCompile Include="..\tutorial\test_async_when_all.cpp">

正在加载...
取消
保存