-
Notifications
You must be signed in to change notification settings - Fork 16
/
deno_flocks.deno.txt
19 lines (13 loc) · 1.75 KB
/
deno_flocks.deno.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
DENO_FLOCKS
VERSION ==> #Part of Deno
--unstable-fs !#
FILE.lock[Sync]([BOOL])->[>] #Acquire lock on FILE.
#BOOL (def: false) is whether lock is exclusive, as opposed to shared, to a single process.
#Waits if either:
# - another process has an exclusive lock
# - another process has a shared lock, and current process wants an exclusive lock
#Based on underlying syscall flock.
#It is advisory-only: it only works if other processes also acquire lock with flock.
FILE.unlock()->[>] #Release lock