Synchronously wait for the shutdown to complete, i.e. waits for the reference counter to drop to zero.
()
| 84 | * the reference counter to drop to zero. |
| 85 | */ |
| 86 | public synchronized void finishShutdown() { |
| 87 | if (!shutdown) |
| 88 | throw new IllegalStateException("Not shutting down"); |
| 89 | |
| 90 | while (count > 0) { |
| 91 | try { |
| 92 | wait(); |
| 93 | } catch (InterruptedException e) { |
| 94 | } |
| 95 | } |
| 96 | } |
| 97 | } |