1 | synchronized (internalFinalizersMutex) {↵ | | |
|
2 | if (internalFinalizers != null) {↵ | | 1 | if (threadService.getCritical()) {↵
|
| | | 2 | // If the target thread is sleeping or stopped, wake it↵
|
| | | 3 | synchronized (this) {↵
|
| | | 4 | notify();↵
|
| | | 5 | }↵
|
| | | 6 | ↵
|
| | | 7 | // interrupt the target thread in case it's blocking or waiting↵
|
| | | 8 | // WARNING: We no longer interrupt the target thread, since this usually means↵
|
| | | 9 | // interrupting IO and with NIO that means the channel is no longer usable.↵
|
3 | internalFinalizers.remove(finalizer);↵ | | 10 | ↵
|
4 | }↵ | | |
|
| | | 11 | // We either need a new way to handle waking a target thread that's waiting↵
|
| | | 12 | // on IO, or we need to accept that we can't wake such threads and must wait↵
|
| | | 13 | // for them to complete their operation.↵
|
| | | 14 | //threadImpl.interrupt();↵
|
5 | } | | 15 | }
|