You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for your work, I am really enoying working with S&R.
I wanted to use exec::static_thread_pool in a GUI application and noticed that I have very high CPU usage when I create an exec::static_thread_pool without enqueuing anything. I think it comes down to this function which means one stealer thread is always kept alive and attempts to pop the queues, even though nothing has been enqueued.
if (pool_->numThiefs_.fetch_sub(1, std::memory_order_relaxed) == 1) {
notify_one_sleeping();
}
}
I guess this is intentional to reduce latency, but when i started i have to say that this behaviour wasn't clear to me. I also could not find any documentation for static_thread_pool or issue here on Github talking about this. So i am asking just in case for me and for anyone else that would attempt the same.
Thanks,
Michael
The text was updated successfully, but these errors were encountered:
Hi,
Thanks for your work, I am really enoying working with S&R.
I wanted to use
exec::static_thread_pool
in a GUI application and noticed that I have very high CPU usage when I create an exec::static_thread_pool without enqueuing anything. I think it comes down to this function which means one stealer thread is always kept alive and attempts to pop the queues, even though nothing has been enqueued.stdexec/include/exec/static_thread_pool.hpp
Lines 930 to 934 in b888185
I guess this is intentional to reduce latency, but when i started i have to say that this behaviour wasn't clear to me. I also could not find any documentation for static_thread_pool or issue here on Github talking about this. So i am asking just in case for me and for anyone else that would attempt the same.
Thanks,
Michael
The text was updated successfully, but these errors were encountered: