Skip to content
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

first pass review #1

Open
vitiral opened this issue Jan 30, 2018 · 3 comments
Open

first pass review #1

vitiral opened this issue Jan 30, 2018 · 3 comments

Comments

@vitiral
Copy link
Contributor

vitiral commented Jan 30, 2018

@nikomatsakis I would love you to take a look at the API presented in this crate, especially the join_pool macro. Tell me what you think!

I'm hoping to package synchronization+threading so that it is beginner friendly and extremely simple. One of the things that bit me early was "how do I spawn more than 2 threads with rayon?" This tries to make that simple.

@vitiral
Copy link
Contributor Author

vitiral commented Jan 30, 2018

@killercup heads up for you as well 😄

@nikomatsakis
Copy link

nikomatsakis commented Feb 21, 2018

One of the things that bit me early was "how do I spawn more than 2 threads with rayon?" This tries to make that simple.

Sounds interesting! I'll try to read into the docs. From a quick glance I didn't quite "get it". Regarding spawning more than two threads, I guess the spawn APIs were deemed too complex? Or perhaps just ill-documented?

The simplest way, if you don't need access to the stack, is definitely rayon::spawn:

rayon::spawn(move || ...); // starts a "thread"

@vitiral
Copy link
Contributor Author

vitiral commented Feb 21, 2018

Hey @nikomatsakis, I ended up removing join_pool (and rayon) but we are going to add rayon without join_pool via #6. I think I didn't understand rayon's use cases well enough when I first did this (mainly that it does not guarantee more than one thread running!) but now that I understand more I think I can include the actual uses where rayon is useful and how it can fit into using it side-by-side with other parallism

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

No branches or pull requests

2 participants