moving fireSync location

This commit is contained in:
Gabriel mermelstein 2025-07-07 15:51:07 +03:00
parent 34696a5837
commit 865ca0195a

View File

@ -192,6 +192,11 @@ proc wakuThreadBody(ctx: ptr WakuContext) {.thread.} =
error "waku thread could not receive a request"
continue
## Handle the request
echo "--------------- before asyncSpawn"
asyncSpawn WakuThreadRequest.process(request, addr waku)
echo "------------- after asyncSpawn"
echo "----------- wakuThreadBody 7 sending sync"
let fireRes = ctx.reqReceivedSignal.fireSync()
echo "----------- wakuThreadBody after sending sync"
@ -199,11 +204,6 @@ proc wakuThreadBody(ctx: ptr WakuContext) {.thread.} =
echo "----------- failed sending sync"
error "could not fireSync back to requester thread", error = fireRes.error
## Handle the request
echo "--------------- before asyncSpawn"
asyncSpawn WakuThreadRequest.process(request, addr waku)
echo "------------- after asyncSpawn"
waitFor wakuRun(ctx)
proc createWakuContext*(): Result[ptr WakuContext, string] =