Fix race-condition in test case.

The wait() call without arguments could miss the initial emit(), if called too late, which could easily happen on VMs with less predictable timing.
This commit is contained in:
Sönke Ludwig 2018-10-27 00:43:26 +02:00
parent 6caff0b105
commit 4394374364

View file

@ -38,7 +38,7 @@ void main()
void worker()
{
ev.wait();
ev.wait(0);
ev.emit();
setTimer(dur!"seconds"(1), {
auto c = atomicOp!"+="(counter, 1);