Hey Andrew,
  Congratulations on the release!

  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?
John

On Wednesday, November 5, 2014 9:20:37 AM UTC-8, Andrew Collette wrote:
>
> Hi Ray, 
>
> > Great news! Many thanks to the h5py team! 
> > 
> > What exactly does it mean for the API to be thread-safe? Can we now 
> > read/write datasets in parallel without using MPI? 
>
> It means that you can use h5py objects in a threaded program without 
> manually locking everything.  For example, this code: 
>
> data = dset[0:100] 
>
> is now an atomic operation; other threads can't interfere with the 
> reading of data.  Previously, it was required that such operations be 
> surrounded by threading locks, or bad things might happen while h5py 
> was reading & returning the data.  For example, another thread might 
> change the size of the dataset mid-read, with undefined results. 
>
> MPI is still necessary if you want multiple processes to interact with 
> the file. But other programs (e.g. web servers) which only 
> occasionally talk to HDF5 should have an easier time. 
>
> 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