29 Scheduler(int32_t numberOfThreads);
30 void schedule(async::task_run_handle t);
32 CesiumImpl::ImmediateScheduler<Scheduler> immediate{
this};
34 async::threadpool_scheduler scheduler;
37 static auto createPreRun(ThreadPool::Scheduler* pScheduler) {
39 [pScheduler]() { ThreadPool::_scope = pScheduler->immediate.scope(); };
42 static auto createPostRun() noexcept {
43 return []()
noexcept { ThreadPool::_scope.reset(); };
46 static thread_local CesiumImpl::ImmediateScheduler<Scheduler>::SchedulerScope
49 std::shared_ptr<Scheduler> _pScheduler;
51 template <
typename T>
friend class Future;
52 template <
typename T>
friend class SharedFuture;
53 friend class AsyncSystem;