Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[java] New function: msg.Comm.waitAll()
[simgrid.git] / src / bindings / java / org / simgrid / msg / Comm.java
index 29c5587..16844aa 100644 (file)
@@ -54,6 +54,14 @@ public class Comm {
         */
        public native void waitCompletion(double timeout) throws TransferFailureException, HostFailureException, TimeoutException;
 
+       /** Wait all of the communications */
+       public native static void waitAll(Comm[] comms, double timeout) throws TransferFailureException, HostFailureException, TimeoutException;
+       /** Wait all of the communications, with no maximal delay */
+       public static void waitAll(Comm[] comms) throws TransferFailureException, HostFailureException, TimeoutException {
+               waitAll(comms, -1.);
+       }
+       /** Wait any of the communications, and return the rank of the terminating comm */
+       //public native int waitAny(Comm[] comms);
        /**
         * Returns the task associated with the communication.
         * if the communication isn't finished yet, will return null.