Skip to content

Commit

Permalink
Lock example file script snippet.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Dec 21, 2024
1 parent 6e6cb1a commit 9f7087b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/lock.n8
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/opt/n8lang/bin/n8

val x = 3.14
lock(x) {
render! "Value of x inside lock is: " + x
x = 2.71
render! "Value of x inside lock after attempted update is: " + x
}

render! "Value of x outside lock is: " + x
x = 1.61
render! "Value of x outside lock after attempted update is: " + x

0 comments on commit 9f7087b

Please sign in to comment.