mirror of
https://github.com/logos-storage/apatheia.git
synced 2026-01-02 13:03:11 +00:00
docs
This commit is contained in:
parent
9a74fea86a
commit
b7ddb871fe
@ -21,12 +21,13 @@ type
|
||||
signal: ThreadSignalPtr
|
||||
chan*: ChanPtr[T]
|
||||
|
||||
proc destroy*[T](val: SignalQueue[T]) =
|
||||
proc dispose*[T](val: SignalQueue[T]) =
|
||||
## Call to properly dispose of a SignalQueue.
|
||||
deallocShared(val.chan)
|
||||
discard val.signal.close()
|
||||
|
||||
proc newSignalQueue*[T](maxItems: int = 0): SignalQueue[T] {.raises: [ApatheiaSignalErr].} =
|
||||
## Create a signal queue compatible with Chronos async
|
||||
## Create a signal queue compatible with Chronos async.
|
||||
let res = ThreadSignalPtr.new()
|
||||
if res.isErr():
|
||||
raise newException(ApatheiaSignalErr, res.error())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user