query SchedMode #3456
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.
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.
The text was updated successfully, but these errors were encountered: