flock: Low-level flock object

Description Usage Arguments Methods

Description

Low-level flock object. Use this if you need more flexibility than with_flock, but understand that if you get it wrong you can cause deadlocks.

Usage

1
flock(filename, method = "fcntl")

Arguments

filename

Name of file to lock. NULL is a fake lock; acquire always succeeds.

method

Method to use

Methods

acquire

Attempt to acquire a lock on the file. For details on arguments see the main argument section above.

Usage: acquire(delay = 0.01, max_delay = 0.1, timeout = Inf, error = TRUE, verbose = FALSE)

Arguments:

  • delay: Initial delay

  • max_delay: Maximum delay between attempts

  • timeout: Maximum time to wait

  • error: Throw an error on failure?

  • verbose: Print information while attempting to acquire lock?

release

Release the lock.

Usage: release()


richfitz/seagull documentation built on May 27, 2019, 8:42 a.m.