Skip to content

Futures: There should be a way to interrupt wgpuInstanceWaitAny via CPU-timeline event #495

@kainino0x

Description

@kainino0x

Originally we did not have any way to interrupt running WaitAny calls, or generally send CPU→CPU events. The reason for this was that vkWaitForFences cannot do it. However, since we have a clean distinction between CPU-timeline and Queue-timeline operations, this is actually very simple to add (it's exactly how async pipeline creation works, already).

One important design pattern needs it, which is having an application thread which uses WaitAny to watch for events and e.g. forward them into an event loop. It needs to be possible to interrupt WaitAny each time a new Future is created, so the new Future can be added to its list. This is only possible with mixed-source waiting, but most systems should have that capability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    asyncAsynchronous operations and callbacksnon-breakingDoes not require a breaking change (that would block V1.0)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions