spogulis no
https://github.com/tearshark/librf.git
synced 2024-10-01 15:57:07 +08:00
整理mutex_v2代码
Šī revīzija ir iekļauta:
vecāks
bebda7391d
revīzija
8ffe1d24e2
@ -78,10 +78,10 @@ RESUMEF_NS
|
||||
{
|
||||
this->_thandler = this->_scheduler->timer()->add_handler(tp,
|
||||
[st = counted_ptr<state_mutex_t>{ this }](bool canceld)
|
||||
{
|
||||
if (!canceld)
|
||||
st->on_timeout();
|
||||
});
|
||||
{
|
||||
if (!canceld)
|
||||
st->on_timeout();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
@ -20,20 +20,14 @@ RESUMEF_NS
|
||||
|
||||
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
|
||||
{
|
||||
this->_scheduler = sch;
|
||||
this->_coro = handler;
|
||||
this->_root = root;
|
||||
}
|
||||
|
||||
timer_handler _thandler;
|
||||
protected:
|
||||
timer_handler _thandler;
|
||||
state_base_t* _root;
|
||||
std::atomic<mutex_v2_impl**> _value;
|
||||
};
|
||||
|
@ -40,13 +40,13 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
Notiek ielāde…
Atsaukties uz šo jaunā problēmā
Block a user