Skip to content

Check that IO runtime != CPU runtime #174

@crepererum

Description

@crepererum

What

Add a check that makes sure that calls to async host methods and to async_in_sync_context are never done from the tokio I/O runtime.

Why

With #173 it becomes somewhat important that the I/O runtime stays responsive. In general it's somewhat a footgun if people mix these two runtimes, even without #173.

How

The only way to reason about the identity of a tokio runtime seems to be tokio::runtime::Handle::id -- which is currently marked as "unstable". Hence we need to wait til it is available without compiling tokio with tokio_unstable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked by upstreamNot actionable at the moment, because we are waiting for upstream changes.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions