Skip to content

query SchedMode #3456

Closed
Closed
@jesse99

Description

@jesse99

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions