Call {shutdown,destroy} on priority_scheduler destruction in C++11 example.

This commit is contained in:
Christopher Kohlhoff 2020-04-08 09:14:32 +10:00
parent c2cee7860f
commit 6ef3e9544e

View File

@ -79,6 +79,12 @@ public:
int priority_;
};
~priority_scheduler() noexcept
{
shutdown();
destroy();
}
executor_type get_executor(int pri = 0) noexcept
{
return executor_type(*const_cast<priority_scheduler*>(this), pri);