Skip to content

Async invoke tasks inherit the running-engine context, so raise_ from them is treated as internal #707

Open

Description

@fgmacedo

Why

Tasks spawned for an async invoke copy the _running_engine ContextVar from the step that spawned them. A raise_() from inside such a task is then taken as an internal event of a macrostep that already ended, instead of going to the external queue.

Scope

Reproduce with a test on the async engine; run invoke tasks outside the running-engine context.

Refs #692

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

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions