smol-rs / smol-rs/async-executor
Wake up threads more aggressively if there is known work to do
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 459
- Forks
- 52
- Avg merge
- 6h 53m
- Merged PRs (30d)
- 1
Description
Upon investigating https://github.com/bevyengine/bevy/issues/6941, we've found that thread wakeup times have been a significant bottleneck when spinning up large batches of tasks, like those mentioned in #91.
Would it be possible to more aggressively wake up threads (i.e. 2+ at a time), if and only if we know there is sufficient work for all of them? Whenever a thread is stealing work from another, it has an approximation of how much remaining work is in both threads, so it may be reasonable to weigh the potential contention against the cost of sequentially context switches as threads wake up.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by investigating the thread wakeup and work-stealing behavior described here, then read the findings in Bevy issue #6941 and the large-batch context in #91. The issue does not name files, tests, an entry point, or an acceptance criterion, so those must be established before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100