Skip to content

query SchedMode #3456

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

Closed
jesse99 opened this issue Sep 11, 2012 · 4 comments
Closed

query SchedMode #3456

jesse99 opened this issue Sep 11, 2012 · 4 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@jesse99
Copy link
Contributor

jesse99 commented Sep 11, 2012

Writing libraries that interface with blocking foreign code is very delicate because it's way too easy for users to call the library with a SchedMode that will wind up blocking multiple tasks. Even worse the failure mode is non-deterministic and depends on the number of tasks running and the number of cores available.

One way to alleviate this is to add some sort of get_sched_mode function to task.rs. Then the library code could assert that it is not being called with a dangerous mode.

@bblum
Copy link
Contributor

bblum commented Sep 11, 2012

This would be a fine holdover solution. I think a real solution would involve simply not exposing such library functions to rust-land at all, or if so, making them scheduler-enabled -- #3367.

@jesse99
Copy link
Contributor Author

jesse99 commented Sep 11, 2012

It's a time bomb so I think there should be something in place.

@bblum
Copy link
Contributor

bblum commented Sep 11, 2012

Yes.

@Aatch
Copy link
Contributor

Aatch commented May 21, 2013

The new scheduler will have work-stealing, so this kind of blocking is less of an issue unless you are only running a single thread.

@Aatch Aatch closed this as completed May 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

3 participants