浏览代码

完成新版本下的channel

tags/v2.9.7
tearshark 4 年前
父节点
当前提交
ff96b20308
共有 3 个文件被更改,包括 7 次插入17 次删除
  1. 2
    2
      librf/src/channel.h
  2. 3
    3
      vs_proj/librf.cpp
  3. 2
    12
      vs_proj/librf.vcxproj

+ 2
- 2
librf/src/channel.h 查看文件

@@ -168,7 +168,7 @@ namespace resumef
template<class _Ty2>
future_t<bool> write(_Ty2&& val) const
{
promise_t<bool> awaitable;
awaitable_t<bool> awaitable;
auto awaker = std::make_shared<channel_write_awaker>(
[st = awaitable._state](channel_impl_type * chan) -> bool
@@ -183,7 +183,7 @@ namespace resumef
future_t<_Ty> read() const
{
promise_t<_Ty> awaitable;
awaitable_t<_Ty> awaitable;
auto awaker = std::make_shared<channel_read_awaker>(
[st = awaitable._state](channel_impl_type *, _Ty * val, error_code fe) -> bool

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

@@ -43,7 +43,9 @@ int main(int argc, const char* argv[])
//resumable_main_timer();
//resumable_main_benchmark_mem();
//resumable_main_mutex();
resumable_main_event();
//resumable_main_event();
//resumable_main_event_timeout();
resumable_main_channel();
/*
resumable_main_benchmark_mem();
@@ -54,8 +56,6 @@ int main(int argc, const char* argv[])
resumable_main_when_all();
resumable_main_sleep();
resumable_main_event_timeout();
resumable_main_channel();
*/
return 0;

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

@@ -207,12 +207,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\tutorial\test_async_cb.cpp" />
<ClCompile Include="..\tutorial\test_async_channel.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.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>
@@ -221,12 +216,7 @@
</ClCompile>
<ClCompile Include="..\tutorial\test_async_dynamic_go.cpp" />
<ClCompile Include="..\tutorial\test_async_event.cpp" />
<ClCompile Include="..\tutorial\test_async_event_timeout.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_event_timeout.cpp" />
<ClCompile Include="..\tutorial\test_async_exception.cpp" />
<ClCompile Include="..\tutorial\test_async_modern_cb.cpp" />
<ClCompile Include="..\tutorial\test_async_multi_thread.cpp" />

正在加载...
取消
保存