A new method that interrupts the worker thread. Call this method to force the worker to stop what it's doing.
()
| 94 | * to force the worker to stop what it's doing. |
| 95 | */ |
| 96 | public void interrupt() { |
| 97 | Thread t = threadVar.get(); |
| 98 | if (t != null) { |
| 99 | t.interrupt(); |
| 100 | } |
| 101 | threadVar.clear(); |
| 102 | } |
| 103 | |
| 104 | /** |
| 105 | * Return the value created by the <code>construct</code> method. |