From 240b1cb2801fdacc627655d3d2fe09f7959f82a2 Mon Sep 17 00:00:00 2001 From: Gabriel mermelstein Date: Fri, 4 Jul 2025 17:02:07 +0200 Subject: [PATCH] adding lock logs --- library/waku_context.nim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/waku_context.nim b/library/waku_context.nim index c766dfaae..09a2a645e 100644 --- a/library/waku_context.nim +++ b/library/waku_context.nim @@ -81,13 +81,17 @@ proc sendRequestToWakuThread*( timeout = InfiniteDuration, ): Result[void, string] = echo "------------------- sendRequestToWakuThread 1" + echo "--------- acquiring lock" ctx.lock.acquire() + echo "--------- acquired lock" # This lock is only necessary while we use a SP Channel and while the signalling # between threads assumes that there aren't concurrent requests. # Rearchitecting the signaling + migrating to a MP Channel will allow us to receive # requests concurrently and spare us the need of locks defer: + echo "------- releasing lock" ctx.lock.release() + echo "------- released lock" echo "------------------- sendRequestToWakuThread 2" let req = WakuThreadRequest.createShared(reqType, reqContent, callback, userData)