[ome-devel] async callbacks in blitz 5.4.x

Manuel Stritt manuel.stritt at idorsia.com
Tue Oct 24 12:51:51 BST 2017


Dear all,

I'm wondering what's the correct way to handle async callbacks, e.g.
deleting an object, as a non-async call
(wait until the command has been executed).

The docu for deleting an object:
https://docs.openmicroscopy.org/omero/5.4.0/developers/Java.html#delete-data

calls loop(10,500) to wait until it is finished.
- why do you wait 10 times 500 and not one time 5000 ?
- if the call is finished after a few loops, will it still do the other
waits?
- is there a guaranty that after the loop call the command has been
finished?

My goal is to wait until the call is finished.
What about s.th. like

CmdCallbackI callback = dm.delete(context, object);
while (callback.getResponse()!=null) {
  Thread.sleep(100);
}
?

Thanks for your help!

Regards,
Manuel

-- 

The information of this email and in any file transmitted with it is 
strictly confidential and may be legally privileged.
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.
The content of this email is not legally binding unless confirmed by letter.
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20171024/f7b4dd24/attachment.html>


More information about the ome-devel mailing list