-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
WorkQueue implementation #13227
WorkQueue implementation #13227
Conversation
cc @pcwalton |
In my opinion, we should have something like the Thread Building Blocks task graphs, although it would be much easier to just do a tree to start with. The building blocks for work stealing are there after all. |
We need to not take this step lightly. Rust is almost powerful enough now to express a lot of cool stuff and there are multiple competing work stealing implementations in development. This subject is probably RFC worthy. |
@@ -0,0 +1,278 @@ | |||
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this say 2014?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, I blindly copied that from another file. Fixed.
On Mon, Mar 31, 2014 at 12:58:56PM -0700, Brian Anderson wrote:
+1 |
Thank you for this work, I think it's great that there's effort behind adding a work queue! I agree with @brson though, that this is a broad enough topic that it warrants an RFC. Work queues have many flavors to them, and I think that an RFC is necessary to discuss the tradeoffs and discuss design for the one inside of Our RFC process is documented at the rfcs repo. |
Restructure `find_path` into a separate functions for modules and non-module items Follow up to rust-lang/rust-analyzer#13212 Also renames `prefer_core` imports config to `prefer_no_std` and changes the behavior of no_std path searching by preferring `core` paths `over` alloc This PR turned into a slight rewrite, so it unfortunately does a few more things that I initially planned to (including a bug fix for enum variant paths)
A simple worker queue.
Example
Jobs can be queued from other tasks: