()
| 141 | // first call super stop() method then wait_thread(). |
| 142 | // This method will wait forever for the thread to exit. |
| 143 | public void wait_thread_long() { |
| 144 | if (thread != null) { |
| 145 | boolean interrupted; |
| 146 | do { |
| 147 | interrupted = false; |
| 148 | try { |
| 149 | thread.join(); |
| 150 | } |
| 151 | catch (InterruptedException e) { |
| 152 | interrupted = true; |
| 153 | super.stop(); // send thread a stop message |
| 154 | } |
| 155 | } while (interrupted); |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | public long bytes_in() |
| 160 | { |