Open garbled1 opened 7 years ago
Need a function or similar to get the lock sequence number when acquiring a lock. If you want to do something like a shell script that utilizes the lock, you can't:
SEQ=$(take_lock.py) do_something_that_needs_locking release_lock.py -s ${SEQ}
Currently I do this by printing lock._sequence, but that is obviously bad form. Would like lock.get_sequence() or similar please.
Need a function or similar to get the lock sequence number when acquiring a lock. If you want to do something like a shell script that utilizes the lock, you can't:
!/bin/bash
SEQ=$(take_lock.py) do_something_that_needs_locking release_lock.py -s ${SEQ}
Currently I do this by printing lock._sequence, but that is obviously bad form. Would like lock.get_sequence() or similar please.