From: Guillaume N. <gn...@co...> - 2006-02-09 07:58:27
|
Hi ! It seems that the latest refactoring of the continuations introduced a small bug in the WaitingContinuation. Previously, when passing null to the ContinuationSupport, the mutex was set to the continuation itself. This is no longer the case, and the mutex is not set and an NPE is thrown when calling suspend. I had to add the following lines to avoid this: if (cont instanceof WaitingContinuation && cont.isNew()) { ((WaitingContinuation) cont).setMutex(cont); } The setMutex should be: public void setMutex(Object mutex) { if (!_new && _mutex!=this) throw new IllegalStateException(); _mutex = mutex==null ? this : mutex; } Cheers, Guillaume Nodet |