-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unifex task/timed_single_thread_context cannot run 1 million concurrent tasks #648
Comments
stdexec doesn't have an |
Ah ok, libunifex's |
Use a heap to avoid possibly linear enqueue operation time. Fixes facebookexperimental#648
I wonder how important the single thread context is. Who uses it and for what? |
|
https://github.com/Xavorim/cpp_tasks_bench?tab=readme-ov-file#results-on-my-system benchmarks libunifex against a few other concurrency libraries. The benchmark attempts to launch 1 million concurrent tasks. Unfortunately, the benchmark states libunifex hangs at just 100K tasks. I am able to replicate this myself, with the benchmark program at 100% for a minute until I killed the program.
I reimplemented the benchmark with
async_manual_reset_event
instead oftimed_single_thread_context
, and I am able to launch 1 million tasks in about 4 seconds: Xavorim/cpp_tasks_bench#1I'm entering this issue to see if the timer scheduler can be improved. I'll also compare against stdexec (as the benchmark repo doesn't include it currently).
stdexec benchmark
stdexec appears to be able to run 1 million tasks with
exec::timed_thread_context
The text was updated successfully, but these errors were encountered: