void post(F fun) { struct impl : runnable { F f; impl(F&& mf) : f(std::move(mf)) { } void run() override { f(); } }; dispatch_runnable(make_counted<impl>(std::move(fun))); }
void post(F fun) { struct impl : runnable { F f; impl(F&& mf) : f(std::move(mf)) { } void run() override { f(); } }; dispatch_runnable(runnable_ptr{detail::memory::create<impl>(std::move(fun))}); }