Thread interrupt: will it cancel oncoming wait() call?
问题 I have a thread which has an incoming job queue (a LinkedList containing job descriptions). The thread blocks with wait() on the queue when there's no job to work on. An external job dispatcher object awakes it with notify() when it places new jobs on the queue. At shutdown of my program i call interrupt() on the Thread. This raises InterruptedException when the Thread awaits for jobs in wait() . My question is: what will happen if i interrupt the Thread while it's not blocking but doing some