From b2b8a0ce844dc28a512761457c4e9e5d861d0b8d Mon Sep 17 00:00:00 2001 From: Jaremy Creechley Date: Mon, 20 May 2024 21:45:03 +0300 Subject: [PATCH] work around windows - no without --- codex/utils/asyncthreads.nim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/codex/utils/asyncthreads.nim b/codex/utils/asyncthreads.nim index 2fb7e61c..bc279623 100644 --- a/codex/utils/asyncthreads.nim +++ b/codex/utils/asyncthreads.nim @@ -48,9 +48,10 @@ proc send*[T](queue: SignalQueuePtr[T], msg: T): ?!void {.raises: [].} = except Exception as exc: return failure(exc.msg) - without wasSent =? queue[].signal.fireSync(InfiniteDuration).mapFailure, err: - return failure(err) - if wasSent: + let res = queue[].signal.fireSync(InfiniteDuration).mapFailure() + if res.isErr: + return failure(res.error()) + if res.get(): return ok() else: return failure("ThreadSignalPtr not signalled in time")