Skip to content

Commit

Permalink
yielding to give opportunity for framer thread
Browse files Browse the repository at this point in the history
  • Loading branch information
lucianoviana committed Sep 18, 2024
1 parent 5ae867b commit 33e9fcb
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ public <T> T await(final Supplier<T> supplier)
() ->
{
poll();
Thread.yield();
aux.set(supplier.get());
return aux.get() != null;
});
Expand All @@ -301,6 +302,7 @@ public <T> T await(final String message, final Supplier<T> supplier)
() ->
{
poll();
Thread.yield();
aux.set(supplier.get());
return aux.get() != null;
});
Expand All @@ -315,6 +317,7 @@ public void await(final String message, final BooleanSupplier predicate)
() ->
{
poll();
Thread.yield();
return predicate.getAsBoolean();
});
}
Expand Down

0 comments on commit 33e9fcb

Please sign in to comment.