The 'lifecycleLock' is now acquired within the isRunning() method.
This commit is contained in:
@@ -89,7 +89,13 @@ public class SimpleTaskScheduler implements TaskScheduler {
|
||||
// Lifecycle implementation
|
||||
|
||||
public boolean isRunning() {
|
||||
return this.running;
|
||||
this.lifecycleLock.lock();
|
||||
try {
|
||||
return this.running;
|
||||
}
|
||||
finally {
|
||||
this.lifecycleLock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
public void start() {
|
||||
|
||||
Reference in New Issue
Block a user