diff options
author | flywind <xzsflywind@gmail.com> | 2021-03-16 14:14:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-16 07:14:56 +0100 |
commit | d5eb658034a8a1fffefbc4acdf9cb89f9f741f95 (patch) | |
tree | a0f03347a8b79b2839d78f44deb69c0e606db973 /lib/std | |
parent | da83b992ed0772b7f866ac9246cbbffc835967bd (diff) | |
download | Nim-d5eb658034a8a1fffefbc4acdf9cb89f9f741f95.tar.gz |
fix #17380 (#17391)
Diffstat (limited to 'lib/std')
-rw-r--r-- | lib/std/channels.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/std/channels.nim b/lib/std/channels.nim index 1b0844c48..383a58dda 100644 --- a/lib/std/channels.nim +++ b/lib/std/channels.nim @@ -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 |