Skip to content
This repository was archived by the owner on Aug 11, 2023. It is now read-only.
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Properly synchronize CancellableLoop.
The write to the thread variable was guarded by a lock, but the reads were not. Also, operations in cancel and isRunning methods were not atomic. This could lead to visibility issues and data races (NPEs).
  • Loading branch information
okelepko committed Jun 27, 2015
commit 280c4a057652e8bdbb01a33081e19f49363458e8
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void run() {
} catch (InterruptedException e) {
handleInterruptedException(e);
} finally {
state.set(this);
state.set(FINISHED);
}
}

Expand Down