From 439437436403fcb5399b2c0bcfcf37cfa8b16af3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Sat, 27 Oct 2018 00:43:26 +0200 Subject: [PATCH] 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. --- tests/issue-58-task-already-scheduled.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/issue-58-task-already-scheduled.d b/tests/issue-58-task-already-scheduled.d index 80cc9f6..9325252 100644 --- a/tests/issue-58-task-already-scheduled.d +++ b/tests/issue-58-task-already-scheduled.d @@ -38,7 +38,7 @@ void main() void worker() { - ev.wait(); + ev.wait(0); ev.emit(); setTimer(dur!"seconds"(1), { auto c = atomicOp!"+="(counter, 1);