parent
da83b992ed
commit
d5eb658034
1 changed files with 2 additions and 1 deletions
|
|
@ -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.} =
|
proc channelSend[T](chan: Channel[T], data: sink T, size: int, nonBlocking: bool): bool {.inline.} =
|
||||||
## Send item to the channel (FIFO queue)
|
## Send item to the channel (FIFO queue)
|
||||||
## (Insert at last)
|
## (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.} =
|
proc channelReceive[T](chan: Channel[T], data: ptr T, size: int, nonBlocking: bool): bool {.inline.} =
|
||||||
## Receive an item from the channel
|
## Receive an item from the channel
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue