Hi Sergey
2013/2/22 Sergey Spiridonov <[email protected]> > Hi Dimitris > > > On 02/19/2013 07:00 PM, Dimitris Servis wrote: > > I have implemented a file locking mechanism which is also platform >> independent. The only way to make it work is that you take the file >> handle form the hdf driver and put the lock on the first byte. This >> means that locking is coordinated between processes that respect this >> convention. It is not risk-free though you need to make sure that >> between opening the file and locking the file nobody else has written >> anything. I do this (although I have to check my cod for details) by >> waiting for a shared lock on a different handle, once I have this I go >> ahead and open the real hdf5 handle, release the first lock and make a >> new lock. This also implies that there is only one writer allowed... >> > > Why do you do internal lock then? If you do already external lock, this > must be sufficient... > > External lock is a way to go, only problem can be on read-only > filesystems. Thank you for an idea. > > I do not think that implementing some callback for locking is a > complicated task, but before doing it I want hear opinion of HDF5 > developers. > > -- > Best regards, Sergey Spiridonov > > > > I am not sure what you mean with internal/external lock Cheers -- ds
_______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
