This commit is contained in:
Jaremy Creechley 2024-02-14 22:07:57 -07:00
parent dbaebc26fe
commit ede73f9463

View File

@ -26,6 +26,7 @@ proc destroy*[T](val: SignalQueue[T]) =
discard val.signal.close()
proc newSignalQueue*[T](maxItems: int = 0): SignalQueue[T] {.raises: [ApatheiaSignalErr].} =
## Create a signal queue compatible with Chronos async
let res = ThreadSignalPtr.new()
if res.isErr():
raise newException(ApatheiaSignalErr, res.error())