This commit is contained in:
flywind
2021-03-16 14:14:56 +08:00
committed by GitHub
parent da83b992ed
commit d5eb658034

View File

@@ -456,7 +456,8 @@ proc `=`*[T](dest: var Channel[T], src: Channel[T]) =
proc channelSend[T](chan: Channel[T], data: sink T, size: int, nonBlocking: bool): bool {.inline.} =
## Send item to the channel (FIFO queue)
## (Insert at last)
sendMpmc(chan.d, data.unsafeAddr, size, nonBlocking)
result = sendMpmc(chan.d, data.unsafeAddr, size, nonBlocking)
wasMoved(data)
proc channelReceive[T](chan: Channel[T], data: ptr T, size: int, nonBlocking: bool): bool {.inline.} =
## Receive an item from the channel