-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9711eec
commit 5ad3e84
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# flock | ||
|
||
## flock/acquire | ||
type: cfunction | ||
|
||
[flock.c#L57](flock.c#L57) | ||
|
||
``` | ||
(flock/acquire path wait-mode mode &opt flock) | ||
Open (potentially creating the file) an flock at path,with waitmode :block|:noblock and | ||
mode :shared|:exclusive. Returns the lock, if the lock is non blocking, returns nil is | ||
thelock was already held in an incompatible way. | ||
``` | ||
|
||
## flock/locked? | ||
type: cfunction | ||
|
||
[flock.c#L111](flock.c#L111) | ||
|
||
``` | ||
(flock/locked? l) | ||
Check if the lock object has aquired a lock. | ||
``` | ||
|
||
## flock/new | ||
type: cfunction | ||
|
||
[flock.c#L48](flock.c#L48) | ||
|
||
``` | ||
(flock/new) | ||
Create a new flock that is not locked or associated with any file. | ||
``` | ||
|
||
## flock/release | ||
type: cfunction | ||
|
||
[flock.c#L117](flock.c#L117) | ||
|
||
``` | ||
(flock/release l) | ||
Release file lock. | ||
``` | ||
|
||
|
||
Docs generated by: https://github.com/andrewchambers/janet-md-doc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,6 @@ Simple file locking with flock for janet. | |
...) | ||
``` | ||
|
||
## API | ||
|
||
[here](API.md) |