mirror of
https://github.com/tommyskeff/futur4j.git
synced 2026-01-18 07:16:45 +00:00
optimization for virtual threads
This commit is contained in:
@@ -160,10 +160,10 @@ public final class PromiseTests {
|
||||
public void testRace() throws TimeoutException {
|
||||
assert pfac.race(
|
||||
List.of(
|
||||
pfac.start().thenSupplyDelayedAsync(() -> true, 50, TimeUnit.MILLISECONDS),
|
||||
pfac.start().thenSupplyDelayedAsync(() -> false, 150, TimeUnit.MILLISECONDS)
|
||||
pfac.start().thenSupplyDelayedAsync(() -> true, 150, TimeUnit.MILLISECONDS),
|
||||
pfac.start().thenSupplyDelayedAsync(() -> false, 200, TimeUnit.MILLISECONDS)
|
||||
)
|
||||
).join(100L);
|
||||
).join(300L);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user