Skip to content

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

Closed
@brson

Description

@brson

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>.

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

    Issue actions