Skip to content

#define for infinite timeout? #543

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.)

Activity

  1. added
    !discussNeeds discussion (at meeting or online)
    non-breakingDoes not require a breaking change (that would block V1.0)
    on May 19, 2025
  2. cwfitzgerald commented on May 20, 2025

    @cwfitzgerald
    Collaborator

    Sure, lets do it.

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

    !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