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 authored and iloveeclipse committed Dec 13, 2022
1 parent 01824c2 commit e29fbbd
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 e29fbbd

Please sign in to comment.