Skip to content

#define for infinite timeout? #543

@kainino0x

Description

@kainino0x

In wgpuInstanceWaitAny, uint64_t timeoutNS can be set to a very large value to effectively have no timeout (infinite timeout). Typically UINT64_MAX would be used for this, though technically that's not a sentinel value, it's just a request for a 584-year timeout.

However implementations may optimize large timeout values by avoiding some work (like setting an OS timer or calling setTimeout), so there is some meaning in large values - of course UINT64_MAX is the best guarantee of hitting such optimizations.

Should we #define an "infinite timeout" or "max timeout" constant as UINT64_MAX, as a semantic name for this purpose? (Non-breaking change.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    !discussNeeds discussion (at meeting or online)non-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