-
Notifications
You must be signed in to change notification settings - Fork 16
/
deno_flocks.deno.txt
18 lines (13 loc) · 1.74 KB
/
deno_flocks.deno.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
DENO_FLOCKS
VERSION ==> #Part of Deno
Deno.flock(RID[, BOOL])->> !#Acquire lock on RID.
Deno.flockSync(...) #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.
Deno.funlock(RID)->>
Deno.funlockSync(...) !#Release lock