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.)
In
wgpuInstanceWaitAny,uint64_t timeoutNScan be set to a very large value to effectively have no timeout (infinite timeout). TypicallyUINT64_MAXwould 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 courseUINT64_MAXis the best guarantee of hitting such optimizations.Should we
#definean "infinite timeout" or "max timeout" constant asUINT64_MAX, as a semantic name for this purpose? (Non-breaking change.)