Skip to content

Use a phantom type to indicate task/scheduler context in Scheduler #7011

@brson

Description

@brson
Contributor

Many methods in Scheduler either assert!(self.in_task_context()) or assert!(!self.in_task_context()). This would be more elegantly expressed as a phantom type, Scheduler<TaskCtxt>, Scheduler<SchedCtxt>.

Activity

added a commit that references this issue on Jun 15, 2013
emberian

emberian commented on Aug 5, 2013

@emberian
Contributor

I do not see any such asserts or similar funcionality in rt/sched.rs, closing.

added a commit that references this issue on Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsC-cleanupCategory: PRs that clean code up or issues documenting cleanup.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @brson@emberian

        Issue actions

          Use a phantom type to indicate task/scheduler context in Scheduler · Issue #7011 · rust-lang/rust