forked from I2P_Developers/i2p.i2p
* JobQueue: Synch fix (ticket #670)
This commit is contained in:
@ -211,10 +211,14 @@ public class JobQueue {
|
||||
/**
|
||||
* Returns <code>true</code> if a given job is waiting or running;
|
||||
* <code>false</code> if the job is finished or doesn't exist in the queue.
|
||||
*
|
||||
* Only used by PluginStarter, candidate for deprecation
|
||||
*/
|
||||
public boolean isJobActive(Job job) {
|
||||
if (_readyJobs.contains(job) || _timedJobs.contains(job))
|
||||
return true;
|
||||
synchronized (_jobLock) {
|
||||
if (_readyJobs.contains(job) || _timedJobs.contains(job))
|
||||
return true;
|
||||
}
|
||||
for (JobQueueRunner runner: _queueRunners.values())
|
||||
if (runner.getCurrentJob() == job)
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user