From b4fbe252847275fb3941f2995bb09c03a16bc941 Mon Sep 17 00:00:00 2001 From: Jaremy Creechley Date: Mon, 20 May 2024 20:06:52 +0300 Subject: [PATCH] work around windows --- codex/utils/asyncthreads.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codex/utils/asyncthreads.nim b/codex/utils/asyncthreads.nim index 271e0910..2d5e67d0 100644 --- a/codex/utils/asyncthreads.nim +++ b/codex/utils/asyncthreads.nim @@ -31,7 +31,8 @@ proc release*[T](queue: SignalQueuePtr[T]): ?!void = proc newSignalQueue*[T](maxItems: int = 0): ?!SignalQueuePtr[T] = ## Create a signal queue compatible with Chronos async. result = success cast[ptr SignalQueue[T]](allocShared0(sizeof(SignalQueue[T]))) - without signal =? ThreadSignalPtr.new().mapFailure, err: + let signalRes = ThreadSignalPtr.new().mapFailure + without signal =? signalRes, err: return failure(err) result[].signal = signal result[].chan.open(maxItems)