2nd attempt to fix tryRecv

This commit is contained in:
Araq
2014-10-20 01:49:51 +02:00
parent 59c6433580
commit b0179f9af5

View File

@@ -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 =