From: Samuel Lepetit Date: Thu, 14 Jun 2012 16:57:31 +0000 (+0200) Subject: Add a conveniant method in Comm to wait for the completion of the communication for... X-Git-Tag: v3_9_90~569^2~19^2~38 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/8583dac0ae17dbcb3224c6aeadbc807ed2077e40 Add a conveniant method in Comm to wait for the completion of the communication for an indefinite time --- diff --git a/org/simgrid/msg/Comm.java b/org/simgrid/msg/Comm.java index a0e20447be..b3cdface96 100644 --- a/org/simgrid/msg/Comm.java +++ b/org/simgrid/msg/Comm.java @@ -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; /**