Conversation
24aa3b2 to
6db9912
Compare
Changed threadpools to be Sync, which required the addition of a non-sync manager type in between Pool and Scoped. Added Sentinels to respawn threads (make respawn optional in the future?). Moved benchmarks to benches directory. Removed build script and rustc dependency, changed lazy_static dependency to a fixed version number. Some renaming of methods.
|
Hi, thanks for your contribution! Could you explain a bit in detail why the manager type is needed? It's not directly obvious to me :) Likewise for Sentinel, I'm not exactly sure what it is/how it works. What is the motivation for the method renames? (That is, why are the new names better than the old ones?) |
src/lib.rs
Outdated
There was a problem hiding this comment.
What is the rationale for making this generic over P: Borrow<Pool>?
There was a problem hiding this comment.
It enables Manager<&Pool> if you only want to borrow the pool for a limited scope
Manager<Pool> if you want a single manager to own the pool,
Manager<Arc<Pool>> if you want to shared ownership of the pool.
Moved to crossbream MsQueue to improve performance and remove the need for a Manager. Renamed functions back to execute. Fixed panic conditions to not let the main thread drop if scoped child threads are still going. Added more thread control methods and made existing methods more like AtomicUsize function signatures. Added Anchored pool type which waits for completion to Drop.
|
Hi, just wanted to say that I haven't forgotten about this patch, but I hadn't yet time to look into it further. I also still have those open question in my first comment. :) |
Also renamed compare_and_swap to compare_and_swap_threads
|
Any update on this? :) |
Changed threadpools to be Sync, which required the addition of a non-sync manager type in between Pool and Scoped.
Added Sentinels to respawn threads (make respawn optional in the future?).
Moved benchmarks to benches directory.
Removed build script and rustc dependency, changed lazy_static dependency to a fixed version number.
Some renaming of methods.