Closed dridi closed 4 months ago
Of course I had to forget something, and it was Lck_CondWaitTimeout()
, which I already added to the patch series. I decided to be prudent and keep support for zero meaning never timing out, but looking closely the only case where we use zero is actually in the Lck_CondWait()
function, and Lck_CondWaitTimeout()
when we forward a zero to Lck_CondWaitUntil()
.
So I think we could safely make zero no longer special, and in that case have a 1ms timed wait, or less.
Following consensus, this patch series formalizes several things:
NAN
means that a timeout is not set (only possible in VCL, parameters must have a default value)unset
timeout variables in VCLsess.*timeout*
)INFINITY
disables a timeoutVRT_DECIMAL_MAX
in VCLpoll(2)
case it translates to -1 (akaINFTIM
)setsockopt(2)
case it translates to a zero timevalsetsockopt(2)
translates to a 1us timeout (should it be 1ms?)bereq
timeouts have two levels of fallbackINFINITY
(nomath.h
)I tried to be as thorough as possible, following the trail of relevant timeout parameters.
Fixes #3045