1
0
mirror of https://github.com/tearshark/librf.git synced 2024-10-01 15:57:07 +08:00

整理mutex_v2代码

This commit is contained in:
tearshark 2020-03-23 17:25:58 +08:00
parent bebda7391d
commit 8ffe1d24e2
3 changed files with 7 additions and 13 deletions

View File

@ -20,20 +20,14 @@ RESUMEF_NS
void add_timeout_timer(std::chrono::system_clock::time_point tp); void add_timeout_timer(std::chrono::system_clock::time_point tp);
inline scheduler_t* get_scheduler() const noexcept
{
return _scheduler;
}
inline void on_await_suspend(coroutine_handle<> handler, scheduler_t* sch, state_base_t* root) noexcept inline void on_await_suspend(coroutine_handle<> handler, scheduler_t* sch, state_base_t* root) noexcept
{ {
this->_scheduler = sch; this->_scheduler = sch;
this->_coro = handler; this->_coro = handler;
this->_root = root; this->_root = root;
} }
timer_handler _thandler;
protected: protected:
timer_handler _thandler;
state_base_t* _root; state_base_t* _root;
std::atomic<mutex_v2_impl**> _value; std::atomic<mutex_v2_impl**> _value;
}; };

View File

@ -40,13 +40,13 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v142</PlatformToolset> <PlatformToolset>ClangCL</PlatformToolset>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset> <PlatformToolset>ClangCL</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet> <CharacterSet>NotSet</CharacterSet>
</PropertyGroup> </PropertyGroup>