<div dir="ltr"><br>
<div>Dear all,</div><div><br></div><div>I'm wondering what's the correct way to handle async callbacks, e.g. deleting an object, as a non-async call</div><div>(wait until the command has been executed).</div><div><br></div><div>The docu for deleting an object:</div><div><a href="https://docs.openmicroscopy.org/omero/5.4.0/developers/Java.html#delete-data">https://docs.openmicroscopy.org/omero/5.4.0/developers/Java.html#delete-data</a><br></div><div><br></div><div>calls loop(10,500) to wait until it is finished. </div><div>- why do you wait 10 times 500 and not one time 5000 ?</div><div>- if the call is finished after a few loops, will it still do the other waits?</div><div>- is there a guaranty that after the loop call the command has been finished?</div><div><br></div><div>My goal is to wait until the call is finished.</div><div>What about <a href="http://s.th">s.th</a>. like</div><div><br></div><div>CmdCallbackI callback = dm.delete(context, object);<br></div><div>while (callback.getResponse()!=null) {</div><div> Thread.sleep(100);</div><div>}</div><div>?</div><div><br></div><div>Thanks for your help!</div><div><br></div><div>Regards,</div><div>Manuel</div><div><br></div></div>
<br>
<div><br></div><div><div><font size="2">The information of this email and in any file transmitted with it is strictly confidential and may be legally privileged.</font></div><div><font size="2">It is intended solely for the addressee. If you are not the intended recipient, any copying, distribution or any other use of this email is prohibited and may be unlawful. In such case, you should please notify the sender immediately and destroy this email.</font></div><div><font size="2">The content of this email is not legally binding unless confirmed by letter.</font></div><div><font size="2">Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of the sender's company.</font></div></div>