Skip to content

Support Non-Tokio Schedulers #2201

@tustvold

Description

@tustvold

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

Currently a number of ExecutionPlan operators call tokio::spawn, tokio::spawn_blocking, etc... and will therefore panic if used outside of a tokio runtime. This prevents an incremental migration towards an alternative scheduler (#2199)

Describe the solution you'd like

Operators should use Handle::try_current to determine if running within a tokio context and adjust their behaviour accordingly.

Describe alternatives you've considered

The new scheduler could use Runtime::enter in order to allow the usage of tokio on its worker threads. However, whilst this would work, it would result in work being offloaded from the scheduler's thread pool to the tokio thread pool, which we do not want.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions