-
Notifications
You must be signed in to change notification settings - Fork 241
Open
Labels
Description
currently we do a 32ms wait on the first ticket we try. This is both (sometimes) too short for deadlock detection and also non-optimal because we might end up blocking when another ticket is currently free.
A better approach would be:
- Wait only the LAST ticket we try instead of the first (
@i == @{MaxCountParameter} - 1) - Instead of passing
bool allowWait, we should pass instring? singleWaitExpressionwhich will be something likeexpiry is never (inf) ? 250 : min(250, (1/3)(expiry - now))