work around windows
This commit is contained in:
parent
f5725a8505
commit
b4fbe25284
|
@ -31,7 +31,8 @@ proc release*[T](queue: SignalQueuePtr[T]): ?!void =
|
||||||
proc newSignalQueue*[T](maxItems: int = 0): ?!SignalQueuePtr[T] =
|
proc newSignalQueue*[T](maxItems: int = 0): ?!SignalQueuePtr[T] =
|
||||||
## Create a signal queue compatible with Chronos async.
|
## Create a signal queue compatible with Chronos async.
|
||||||
result = success cast[ptr SignalQueue[T]](allocShared0(sizeof(SignalQueue[T])))
|
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)
|
return failure(err)
|
||||||
result[].signal = signal
|
result[].signal = signal
|
||||||
result[].chan.open(maxItems)
|
result[].chan.open(maxItems)
|
||||||
|
|
Loading…
Reference in New Issue