Concurrency Confusion
sigod via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Aug 10 15:23:59 PDT 2015
On Monday, 10 August 2015 at 22:21:18 UTC, 岩倉 澪 wrote:
> On Saturday, 8 August 2015 at 06:24:30 UTC, sigod wrote:
>> Use negative value for `receiveTimeout`.
>> http://stackoverflow.com/q/31616339/944911
>
> actually this no longer appears to be true?
> Passing -1.msecs as the duration gives me an assertion failure:
>
>>core.exception.AssertError at std/concurrency.d(1902): Assertion
>>failure
>
> Took a look in phobos and it appears to be from this line:
> https://github.com/D-Programming-Language/phobos/blob/master/std/concurrency.d#L1904
>
> If you look at the implementation of receiveTimeout, you'll see
> that it no longer has these lines from the stack overflow
> answer:
>
> if( period.isNegative || !m_putMsg.wait( period ) )
> return false;
>
> https://github.com/D-Programming-Language/phobos/blob/master/std/concurrency.d#L824
That's weird. Especially when latest commit is mine:
https://github.com/D-Programming-Language/phobos/commit/c8048fa48832a97f033b748f5e6b8edde3f2ae29
More information about the Digitalmars-d-learn
mailing list