Skip to content

Commit

Permalink
fix race condition Job.run() with IJobChangeEvent.running() eclipse-p…
Browse files Browse the repository at this point in the history
…latform#271

The abbreviation check eventQueueThread.isEmpty() can become true before
all events processed. Need to have a lock before doing the check.
  • Loading branch information
EcljpseB0T committed Jan 9, 2023
1 parent b566a1f commit 5755d4a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void waitAndSendEvents(InternalJob job, boolean shouldSend) {
boolean send = shouldSend || job.eventQueueLock.isHeldByCurrentThread();
// Synchronize eventQueue to get a stable order of events across Threads.
// There is however no guarantee in which Thread the event is delivered.
while (!job.eventQueue.isEmpty()) {
while (true) {
if (getJobListenerTimeout() == 0) {
// backward compatibility mode for listeners that may deadlock
if (send) {
Expand Down

0 comments on commit 5755d4a

Please sign in to comment.