[armedbear-devel] CL:SLEEP fixed for sub-millisecond intervals

Mark Evenson evenson at panix.com
Sun Mar 2 10:08:44 UTC 2014


On 2/3/14, 19:14, James M. Lawrence wrote:
[…]
>> What would you consider the best option when the timeout value becomes too
>> close to 0? I see 2:
>>
>> 1. Don't wait.
>> 2. Wait at least 1 ns
> 
> In the context of bordeaux-threads, I think it would be unexpected if
> condition-wait did no waiting at all, even if given a timeout that
> will surely be exceeded. In the limit of the timeout approaching zero,
> I would say that condition-wait converges to pthread_yield rather than
> a noop.

[r14362][] fixes CL:SLEEP for intervals less than a millisecond.

For intervals less than or equal to a nanosecond, including an
interval of zero, the current thread yields execution to other
threads at James' suggestion.

[r14362]: http://abcl.org/trac/changeset/14632

-- 
"A screaming comes across the sky.  It has happened before, but there
is nothing to compare to it now."



More information about the armedbear-devel mailing list