Reputation: 10994
In waitComplete
I have a synchronized block with waiting on the lock. My concern is that scheduled interrupt will fire before it gets to wait. Will main thread be allowed to wait when interrupted flag is on?
try {
executor.schedule(currentThread::interrupt,100, TimeUnit.MILLISECONDS);
completor.waitComplete();
fail();
} catch (InterruptedException e) {}
Upvotes: 0
Views: 72