From 34401a3639d016de22050ac3703ce0daa78e18e7 Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Wed, 23 Mar 2016 12:47:05 +0000 Subject: [PATCH] Documentation for `withLock`. --- lib/core/locks.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/core/locks.nim b/lib/core/locks.nim index ba756a8636..66e0ab5208 100644 --- a/lib/core/locks.nim +++ b/lib/core/locks.nim @@ -56,6 +56,8 @@ proc signal*(cond: var Cond) {.inline.} = signalSysCond(cond) template withLock*(a: Lock, body: untyped) = + ## Acquires the given lock, executes the statements in body and + ## releases the lock after the statements finish executing. a.acquire() {.locks: [a].}: try: