Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google storage: allow optional use of thread pool #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomka
Copy link

@tomka tomka commented Dec 21, 2020

If use_threads=True for the Google storage initialization, a thread pool will be used rather than a process pool for fetching data. This is needed in some use cases, for instance if the google storage should be used from within a Celery task. Without this, an error is raised when starting workers from the process pool: AssertionError: daemonic processes are not allowed to have children.

This in turn is needed in catmaid/circuitmap, where we use fafbseg to request fragment IDs for locations from a Celery task.

There might be more elegant ways to this (e.g. without modifying the parameters of _get_seg_ids_gs()), but this seemed minimally invasive, given that this might be a special case. Happy to change it though.

If `use_threads=True` for the Google storage initialization, a thread
pool will be used rather than a process pool for fetching data. This is
needed in some use cases, for instance if the google storage should be
used from within a Celery task.
@schlegelp
Copy link
Collaborator

schlegelp commented Jan 19, 2021

Hi Tom. I'm embarrassed to say that I totally missed this pull request. I have since made substantial changes to fafbseg - including some re-organizing of modules and switching all segmentation queries to the service on spine. The GSPointLoader still exists in the code but is not being used anymore. Is this still relevant for your circuitmap?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants