Message10670
Also used in the package youtube-dl for file locking support:
import fcntl
def _lock_file(f, exclusive):
fcntl.flock(f, fcntl.LOCK_EX if exclusive else fcntl.LOCK_SH)
def _unlock_file(f):
fcntl.flock(f, fcntl.LOCK_UN)
This specific functionality is implementable with https://docs.oracle.com/javase/7/docs/api/java/nio/channels/FileLock.html, which is likely to be portable than JNR for this particular support (based on previous experience - use JNR only when nothing else is available in Java). |
|
Date |
User |
Action |
Args |
2016-01-26 21:20:58 | zyasoft | set | messageid: <1453843258.67.0.0829718094965.issue1943@psf.upfronthosting.co.za> |
2016-01-26 21:20:58 | zyasoft | set | recipients:
+ zyasoft, fwierzbicki, amak, wbrana |
2016-01-26 21:20:58 | zyasoft | link | issue1943 messages |
2016-01-26 21:20:57 | zyasoft | create | |
|