Skip to content

Does Invoke always run in a thread? #610

@spacemanspiff2007

Description

@spacemanspiff2007

I'm reading the Execution model section and I'm unsure if I understand everything correctly. It seems from the docs it's impossible to use a coroutine function as an invoke target.
It's also not easy to spawn a new asyncio Task from the IInvoke protocol because the event loop is not available in the thread.
Is spawning an asyncio Task with a coroutine not possible?

Also I am not sure about this sentence in Execution model
"If the owning state is exited before the handler finishes, the invocation is cancelled".
Canceling the thread does not work at all so cancellation would only work when the user provides a IInvoke protocol object. Correct?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions