Module pact_models::file_utils[][src]

Expand description

Functions for dealing with file locks while reading/writing pact files

Functions

Opens the file and then calls with_read_lock_for_open_file to get the read lock.

Attempts to get a read lock on the open file before proceeding with the provided closure. Has an exponential back-off (100, 1000, 10000 ms), and will return an error if unable to get the lock withing the provided number of attempts.

Attempts to get a write lock on the file before proceeding with the provided closure. Has an exponential back-off (100, 1000, 10000 ms), and will return an error if unable to get the lock withing the provided number of attempts.