system wide mutex

Miki Tebeka miki.tebeka at gmail.com
Mon Feb 10 12:46:20 EST 2014


IIRC creating a directory is atomic in most environments.

On Sunday, February 9, 2014 2:39:51 AM UTC-8, Asaf Las wrote:
> Hi 
> 
> 
> 
> Which one is most recommended to use for mutex alike locking to 
> 
> achieve atomic access to single resource:
> 
> 
> 
> - fcntl.lockf
> 
> - os.open() with O_SHLOCK and O_EXLOCK 
> 
> - https://pypi.python.org/pypi/lockfile/0.9.1
> 
> - https://pypi.python.org/pypi/zc.lockfile/1.1.0
> 
> - any other ?
> 
> 
> 
> Thanks 
> 
> 
> 
> /Asaf




More information about the Python-list mailing list