-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
In this experiment we discovered that Java's CompletableFuture
.get()
blocks then suspends the thread it's on. Apparently when .complete()
on that CompletableFuture
is supposed to wake the suspended thread, but it's not working consistently (sometimes wakes within 2ms like it should, sometimes not till after 200ms).
For MVP we're moving forward with the busy wait, but if there's a more efficient technique that actually works, we should really use it.
The test for this is the assert traitObj.completedDelays == completedDelaysBefore
in TestFixtureFutures
. For anything to be considered working that should pass at least 100 times. Use CI tests if possible, they're much more consistent than reproducing locally.
Metadata
Metadata
Assignees
Labels
No labels