Skip to content

Conversation

@Popog
Copy link

@Popog Popog commented Jan 22, 2016

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.

@Popog Popog force-pushed the master branch 9 times, most recently from 24aa3b2 to 6db9912 Compare January 23, 2016 04:35
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.
@Kimundi
Copy link
Owner

Kimundi commented Jan 24, 2016

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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the rationale for making this generic over P: Borrow<Pool>?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@Kimundi
Copy link
Owner

Kimundi commented Feb 18, 2016

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
@Boscop
Copy link

Boscop commented Apr 10, 2020

Any update on this? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants