Implement RFC #1: FIFO spawns#615
Conversation
|
"WIP" only because I still need to add documentation. |
nikomatsakis
left a comment
There was a problem hiding this comment.
Modulo lack of documentation, this seems quite nice.
nikomatsakis
left a comment
There was a problem hiding this comment.
I see docs are still missing -- I didn't read the rebased code closely yet, just leaving these markers so I remember status.
|
Just an informative "by the way" comment that might be interesting to think about, but doesn't affect this PR much. Here's a quick comparison of TBB's and Rayon's approach to task scheduling: TBB offers two ways to spawn a task:
There's also a notion of task arenas, which I suppose is similar to Rayon's scopes. Another interesting difference is how task stealing works. TBB first attempts to steal from the global FIFO queue and then steals from other workers' LIFO queues. Rayon uses the reverse order. I have a feeling that in this case TBB's strategy might be slightly better. |
|
Docs are ready for review! |
|
r=me with nits fixed |
|
bors r=nikomatsakis |
This implements rayon-rs/rfcs#1, adding
spawn_fifo,scope_fifo, andScopeFifo, and deprecating thebreadth_firstflag.Fixes #590.
Closes #601.