Hi John,

>   Re. thread-safety, I thought code like:
> data = dset[0:100]
>  was already thread-safe since the GIL lock wouldn't be released until the
> call returns.  Is that not the case?

Since much of the slicing code is written in pure Python, it isn't
protected by the GIL.  Even direct calls to certain low-level APIs
like H5Literate are not GIL-protected, because they can have callbacks
which execute pure-Python code.  Likewise for anything that calls the
Python standard library, large portions of which are regular .py
files.

The new solution is similar to thread-safety in HDF5; there's a single
big recursive lock which every public h5py routine acquires.

Andrew

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Reply via email to