Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
12
Task/Secure-temporary-file/PicoLisp/secure-temporary-file.l
Normal file
12
Task/Secure-temporary-file/PicoLisp/secure-temporary-file.l
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
: (out (tmp "foo") (println 123)) # Write tempfile
|
||||
-> 123
|
||||
|
||||
: (in (tmp "foo") (read)) # Read tempfile
|
||||
-> 123
|
||||
|
||||
: (let F (tmp "foo")
|
||||
(ctl F # Get exclusive lock
|
||||
(in F
|
||||
(let N (read) # Atomic increment
|
||||
(out F (println (inc N))) ) ) ) )
|
||||
-> 124
|
||||
Loading…
Add table
Add a link
Reference in a new issue