-
Notifications
You must be signed in to change notification settings - Fork 7
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
Thread safety issues #44
Comments
Internally, the One option is to create a new BTW, I don't use So far, In case it's helpful, here's your example, adapted to use import concurrent.futures
from neuclease.dvid import fetch_volume_box, fetch_raw
server = 'localhost:8000'
uuid = '5cc94d532799484cb01788fcdb7cd9f0'
dname = "grayscale"
full_box = fetch_volume_box(server, uuid, dname)
def get_slice(z):
print(z)
slice_box = full_box.copy()
slice_box[:,0] = (z, z+1)
fetch_raw(server, uuid, dname, slice_box)
return True
def doit():
with concurrent.futures.ThreadPoolExecutor(max_workers=10) as executor:
futs = {executor.submit(get_slice, z): z for z in range(*full_box[:, 0])}
print([f.result() for f in futs])
doit() OK, There may be a more elegant way of keeping a pool of |
Heya, I've been looking into using
libdvid-cpp
in ilastik again and ran into some threading issues.Right away the question, am I doing something wrong?
I have drafted the following minimal example (that expects the docker flyem example volume to be at
localhost:8000
):this resulted in various failures on different runs of the above example:
double free or corruption (!prev) Aborted (core dumped)
munmap_chunk(): invalid pointer Aborted (core dumped)
I haven't had the time yet to look into it, but I wanted to make you aware that this issue exists.
The text was updated successfully, but these errors were encountered: