|
|
@ -353,7 +353,7 @@ public class SimpleThreadPool implements ThreadPool { |
|
|
|
while(handoffPending) { |
|
|
|
while(handoffPending) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
nextRunnableLock.wait(100); |
|
|
|
nextRunnableLock.wait(100); |
|
|
|
} catch(InterruptedException _) { |
|
|
|
} catch(InterruptedException e) { |
|
|
|
interrupted = true; |
|
|
|
interrupted = true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -369,7 +369,7 @@ public class SimpleThreadPool implements ThreadPool { |
|
|
|
// note: with waiting infinite time the
|
|
|
|
// note: with waiting infinite time the
|
|
|
|
// application may appear to 'hang'.
|
|
|
|
// application may appear to 'hang'.
|
|
|
|
nextRunnableLock.wait(2000); |
|
|
|
nextRunnableLock.wait(2000); |
|
|
|
} catch (InterruptedException _) { |
|
|
|
} catch (InterruptedException e) { |
|
|
|
interrupted = true; |
|
|
|
interrupted = true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -380,7 +380,7 @@ public class SimpleThreadPool implements ThreadPool { |
|
|
|
try { |
|
|
|
try { |
|
|
|
wt.join(); |
|
|
|
wt.join(); |
|
|
|
workerThreads.remove(); |
|
|
|
workerThreads.remove(); |
|
|
|
} catch (InterruptedException _) { |
|
|
|
} catch (InterruptedException e) { |
|
|
|
interrupted = true; |
|
|
|
interrupted = true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|