Browse Source

Fix #10667 (#10669)

Remove dependency on timing, so hopefully it shouldn't hang anymore.
Zeta 3 years ago
parent
commit
6bcae15678
1 changed files with 2 additions and 3 deletions
  1. 2 3
      tests/threads/src/cases/TestCondition.hx

+ 2 - 3
tests/threads/src/cases/TestCondition.hx

@@ -9,13 +9,12 @@ class TestCondition extends utest.Test {
 	#if !neko
 	function test() {
 		final cond = new Condition();
-		final thread = Thread.create(() -> {
-			Sys.sleep(0.01);
+		cond.acquire();
+		Thread.create(() -> {
 			cond.acquire();
 			cond.signal();
 			cond.release();
 		});
-		cond.acquire();
 		cond.wait();
 		cond.release();
 		utest.Assert.pass();