From d291ffa5faf48523204667f8060f430ae61ecd64 Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Wed, 14 Jan 2026 01:59:53 +0100 Subject: [PATCH] try not using Lock in libsds.nim --- library/libsds.nim | 5 ----- 1 file changed, 5 deletions(-) diff --git a/library/libsds.nim b/library/libsds.nim index bc4c1e8..e3ca133 100644 --- a/library/libsds.nim +++ b/library/libsds.nim @@ -60,13 +60,10 @@ template callEventCallback(ctx: ptr SdsContext, eventName: string, body: untyped const MaxNumContexts = 32 var ctxPool: array[MaxNumContexts, ptr SdsContext] - ctxPoolLock: Lock proc acquireCtx(callback: SdsCallBack, userData: pointer): ptr SdsContext = echo "acquireCtx called 1" - ctxPoolLock.acquire() echo "acquireCtx called 2" - defer: ctxPoolLock.release() echo "acquireCtx called 3" for i in 0 ..< ctxPool.len: @@ -90,9 +87,7 @@ proc acquireCtx(callback: SdsCallBack, userData: pointer): ptr SdsContext = proc releaseCtx(ctx: ptr SdsContext) = echo "releaseCtx called" - ctxPoolLock.acquire() echo "releaseCtx called 2" - defer: ctxPoolLock.release() echo "releaseCtx called 3" for i in 0 ..< ctxPool.len: echo "releaseCtx called 4, i=" & $i