@@ -211,8 +211,7 @@ proc sendUnbufferedMpmc(chan: ChannelRaw, data: pointer, size: int, blocking: st
211
211
chan.tail = 1
212
212
213
213
release (chan.lock)
214
- when blocking:
215
- signal (chan.dataAvailableCV)
214
+ signal (chan.dataAvailableCV)
216
215
result = true
217
216
218
217
proc sendMpmc (chan: ChannelRaw , data: pointer , size: int , blocking: static bool ): bool =
@@ -251,8 +250,7 @@ proc sendMpmc(chan: ChannelRaw, data: pointer, size: int, blocking: static bool)
251
250
chan.head = 0
252
251
253
252
release (chan.lock)
254
- when blocking:
255
- signal (chan.dataAvailableCV)
253
+ signal (chan.dataAvailableCV)
256
254
result = true
257
255
258
256
proc recvUnbufferedMpmc (chan: ChannelRaw , data: pointer , size: int , blocking: static bool ): bool =
@@ -280,8 +278,7 @@ proc recvUnbufferedMpmc(chan: ChannelRaw, data: pointer, size: int, blocking: st
280
278
assert chan.isEmptyUnbuf ()
281
279
282
280
release (chan.lock)
283
- when blocking:
284
- signal (chan.spaceAvailableCV)
281
+ signal (chan.spaceAvailableCV)
285
282
result = true
286
283
287
284
proc recvMpmc (chan: ChannelRaw , data: pointer , size: int , blocking: static bool ): bool =
@@ -320,8 +317,7 @@ proc recvMpmc(chan: ChannelRaw, data: pointer, size: int, blocking: static bool)
320
317
chan.tail = 0
321
318
322
319
release (chan.lock)
323
- when blocking:
324
- signal (chan.spaceAvailableCV)
320
+ signal (chan.spaceAvailableCV)
325
321
result = true
326
322
327
323
@@ -340,7 +336,7 @@ proc `=destroy`*[T](c: var Chan[T]) =
340
336
else :
341
337
atomicDec (c.d.atomicCounter)
342
338
343
- proc `=` * [T](dest: var Chan [T], src: Chan [T]) =
339
+ proc `=copy ` * [T](dest: var Chan [T], src: Chan [T]) =
344
340
# # Shares `Channel` by reference counting.
345
341
if src.d != nil :
346
342
atomicInc (src.d.atomicCounter)
0 commit comments