Community
Participate
Working Groups
I've run into this problem... this is an over-simplification of the scenario (the local builders do not exhibit this problem), but it illustrates the issue. Thread 1: - my builder uses the spawner to create an external process to run make - the builder then does a waitFor() on the make process to know when the build is done, and update the progress accordingly Thread 2: - Request comes in from user to cancel the process. - Attempt to do Spawner.destroy() is blocked because Thread 1 holds the lock on the Spawner in waitFor() I don't think destroy() should ever by synchronized. You should be able to kill a given process no matter what state it's in; it's your last resort against something that's running amok. Having it synchronized means you are forced to wait for it to complete if anyone anywhere is waiting for it to complete.
Please attach a thread dump of affected threads. In Spawner.waitFor() I would assume that most of the time is spent in wait() and while the thread waits, other threads can enter the monitor, so this should work IMO.
Closing as invalid.