Skip to content

Commit

Permalink
better comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bryce-anderson committed Dec 1, 2023
1 parent 964dbc6 commit b3d5385
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ void queuedTasksAreExecuted() throws InterruptedException {
// wait for t1 to be in the execution loop then submit a task that should be queued.
l1.await();

// note that the behavior of the initial submitting thread executing queued tasks is not critical to
// the primitive: we could envision another use as correct implementation where a submitter will
// execute the task it just submitted but if there are additional tasks the work gets shifted to a
// pooled thread to drain. In that case, the test just needs to be adjusted.
// note that the behavior of the initial submitting thread executing queued tasks is not critical to the
// primitive: we could envision another correct implementation where a submitter will execute the task it just
// submitted but if there are additional tasks the work gets shifted to a pooled thread to drain. If we switch
// the model, the test should be adjusted to conform to the desired behavior.
final AtomicReference<Thread> executingThread = new AtomicReference<>();
executor.execute(() -> executingThread.set(Thread.currentThread()));
assertNull(executingThread.get());
Expand Down

0 comments on commit b3d5385

Please sign in to comment.