Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add a conveniant method in Comm to wait for the completion of the communication for...
authorSamuel Lepetit <samuel.lepetit@inria.fr>
Thu, 14 Jun 2012 16:57:31 +0000 (18:57 +0200)
committerSamuel Lepetit <samuel.lepetit@inria.fr>
Thu, 14 Jun 2012 16:57:31 +0000 (18:57 +0200)
org/simgrid/msg/Comm.java

index a0e2044..b3cdfac 100644 (file)
@@ -57,9 +57,16 @@ public class Comm {
         * raise an exception.
         */
        public native boolean test() throws TransferFailureException, HostFailureException, TimeoutException ;
+       /**
+        * Wait for the complemetion of the communication for an indefinite time
+        */
+       public void waitCompletion() throws TransferFailureException, HostFailureException, TimeoutException {
+               waitCompletion(-1);
+       }
        /**
         * Wait for the completion of the communication.
         * Throws an exception if there were an error in the communication.
+        * @param timeout Time before giving up
         */
        public native void waitCompletion(double timeout) throws TransferFailureException, HostFailureException, TimeoutException;
        /**