We're Hiring!

Multi-threading with BlitzGateway

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

Multi-threading with BlitzGateway

Postby etienne.dumoulin » Tue Nov 27, 2018 9:10 pm

Hi Omero developers,

We are currently running heavy image processes and we would like to multi-thread.

Unfortunately, I think the BlitzGateway object is getting locked when I call it from a different Thread. I have also tried to create one object instance by Thread without any success. Is there a way to create multi-threaded jobs connected to omero on a single machine?

Thank you for your time.

Regards,

Etienne
etienne.dumoulin
 
Posts: 22
Joined: Tue Aug 14, 2018 3:43 pm

Re: Multi-threading with BlitzGateway

Postby jmoore » Wed Nov 28, 2018 8:46 am

Hi Etienne,

is it possible for you to share your code and show us which block you think is the bottleneck?

In general, I don't know of a single lock that would be causing you problems, unless perhaps you are accessing the same IO service from multiple threads. If that's the case, then creating multiple services will likely help with the only caveat being that you will have to keep overall memory usage in mind.

If it's a more underlying issue of BlitzGateway, then one possibility would be to share a single `omero.client` object between multiple gateway objects, but that's mostly a guess in the dark until we know what's causing your problems.

Cheers,
~Josh
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany


Return to Developer Discussion

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron