> To forestall this scenario, I'm thinking of introducing backoff into the
> sleep intervals --- that is, after first failure to get the spinlock,
> sleep 10 msec; after the second, sleep 20 msec, then 40, etc, with a
> maximum sleep time of maybe a second.  The number of iterations would be
> reduced so that we still time out after a minute's total delay.

After the first few sleeps should it add a random() element to the delay
time?

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to