Browse Source

完成sleep结合event的范例测试

tags/v2.9.7
tearshark 4 years ago
parent
commit
65709ca487
3 changed files with 6 additions and 16 deletions
  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 View File

@@ -16,7 +16,7 @@ using namespace std::chrono;
static std::mutex cout_mutex;
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)
{

+ 3
- 3
vs_proj/librf.cpp View File

@@ -45,17 +45,17 @@ int main(int argc, const char* argv[])
//resumable_main_mutex();
//resumable_main_event();
//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)
resumable_main_benchmark_asio_client(atoi(argv[1]));
else
resumable_main_benchmark_asio_server();
resumable_main_when_all();
resumable_main_sleep();
*/
return 0;

+ 2
- 12
vs_proj/librf.vcxproj View File

@@ -208,12 +208,7 @@
</ClCompile>
<ClCompile Include="..\tutorial\test_async_cb.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_event.cpp" />
<ClCompile Include="..\tutorial\test_async_event_timeout.cpp" />
@@ -223,12 +218,7 @@
<ClCompile Include="..\tutorial\test_async_mutex.cpp" />
<ClCompile Include="..\tutorial\test_async_resumable.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_timer.cpp" />
<ClCompile Include="..\tutorial\test_async_when_all.cpp">

Loading…
Cancel
Save