You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, SemaphoreSlim WaitAsync limits itself to int.MaxValue milliseconds. Yet the underlying APIs support (almost) the uint full range, as do CancellationTokenSource and Task.Delay (see #43708).
SemaphoreSlim WaitAsync's range should be extended to match the other APIs to be more consistent and for the same reasons Task.Delay was extended to support the full range, e.g. supporting timeouts for a full month.
Real world use case:
microsoft/garnet implements RESP blocking commands using SemaphoreSlim.WaitAsync. Most implementations accept even large timeouts than int.MaxValue milliseconds, UINT32.MaxValue - 1 is more compatible with existing practice.