jglobus / JGlobus

jGlobus is a collection of Java client libraries for Globus® Toolkit security, GRAM, and GridFTP.
http://www.globus.org/toolkit/jglobus/
Apache License 2.0
24 stars 44 forks source link

Check if error occurs when waiting for completion. #59

Closed romainreuillon closed 11 years ago

romainreuillon commented 11 years ago

The implementation of the method does'nt take into account the case when an error occurs. The consequence is that after a while I get several threads blocked in this state: java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:503) at org.globus.ftp.vanilla.TransferState.waitForEnd(TransferState.java:85)

This patch should fix it.

romainreuillon commented 11 years ago

The status can't change and the error cannot be signaled if all the methods are synchronized. To avoid dead lock wait methods have been unsynchronized.

The wait for start method has been refactored for better readability.

romainreuillon commented 11 years ago

Any update on this merge?

bbockelm commented 11 years ago

Patch looks good to me. Merging.

Sorry for the delay, I'm getting distracted by other projects (plus the extensive holiday break at the university).