is.locked: Locking/Unlocking

Description Usage Arguments Author(s) Examples

Description

Checks whether a lock has been obtained.

Usage

1
is.locked(file.lock)

Arguments

file.lock

The lock as an object of type FileLock.

Author(s)

Ivan Popivanov

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
require(flock)

file.lock = lock("~/file.lock")
# Critical section code goes between here and the unlock call
if(is.locked(file.lock)) {
   print("Got the lock!")
}
unlock(file.lock)

## End(Not run)

flock documentation built on May 19, 2017, 11:31 p.m.

Search within the flock package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.