2nd attempt to fix tryRecv
This commit is contained in:
parent
59c6433580
commit
b0179f9af5
1 changed files with 1 additions and 1 deletions
|
|
@ -234,7 +234,7 @@ proc tryRecv*[TMsg](c: var TChannel[TMsg]): tuple[dataAvailable: bool,
|
|||
if q.mask != ChannelDeadMask:
|
||||
if tryAcquireSys(q.lock):
|
||||
llRecv(q, addr(result.msg), cast[PNimType](getTypeInfo(result.msg)))
|
||||
result.dataAvaliable = true
|
||||
result.dataAvailable = true
|
||||
releaseSys(q.lock)
|
||||
|
||||
proc peek*[TMsg](c: var TChannel[TMsg]): int =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue