"alesj" wrote :
| Looking at HDScanner's activeScan I think I might get away with
| calling cancel on it, and spinning a bit around until it's done (activeScan.isDone
== true).
| public synchronized void suspend()
| {
| suspended = (activeScan != null);
| if (activeScan != null)
| {
| activeScan.cancel(false);
| while(activeScan.isDone() == false)
| {
| try
| {
| Thread.sleep(100);
| }
| catch (InterruptedException ignored)
| {
| }
| }
| activeScan = null;
| }
| }
|
| public synchronized void resume()
| {
| if (suspended)
| {
| start();
| }
| suspended = false;
| }
|
Or too hack-ish? :-)
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215870#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...