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

Thread pool #3896

Closed
wants to merge 1 commit into from
Closed

Thread pool #3896

wants to merge 1 commit into from

Conversation

pcwalton
Copy link
Contributor

@pcwalton pcwalton commented Nov 1, 2012

r? @brson

This is useful for Servo.

@brson
Copy link
Contributor

brson commented Nov 3, 2012

r+. Sorry for the delay. Didn't realize this was in my queue.

@brson
Copy link
Contributor

brson commented Nov 3, 2012

The only thing this provides over a dedicated scheduler (assuming they become more efficient) is the local state. That seems like a useful enough feature, but isn't exactly what I think of when I think of thread pools. Maybe there's a better name for this that makes it clear that this isn't just a workaround for scheduler inefficiencies.

@brson
Copy link
Contributor

brson commented Nov 3, 2012

This also doesn't consider what happens on failure. As written, the tasks are linked so failure of any task will result in failure of the entire pool. A more robust solution will surely have some additional nuance. Maybe a FIXME is warranted.

@brson
Copy link
Contributor

brson commented Nov 3, 2012

Heh. Additionally, this is specifically designed for short tasks, not persistent tasks - if you try to schedule actor-style tasks with event loops here you will deadlock. Maybe something like WorkPool would be a better description.

@brson
Copy link
Contributor

brson commented Nov 5, 2012

I had another use case for this pattern. I think think servo may be able to parallelize selector matching, even with libcss, using a work pool. For my purposes though I think I want my tasks to be on the default scheduler, not dedicated threads.

@brson
Copy link
Contributor

brson commented Nov 7, 2012

r+

@pcwalton pcwalton closed this Nov 7, 2012
calebcartwright pushed a commit to calebcartwright/rust that referenced this pull request Mar 30, 2022
RalfJung pushed a commit to RalfJung/rust that referenced this pull request Sep 22, 2024
… r=RalfJung

ptr_offset_unsigned_overflow: extend test

Test that indeed, the signed version works before the unsigned version is UB.
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.

2 participants