made more tests green; fixes #201
This commit is contained in:
parent
8178cd4fab
commit
a59abdf8e4
13 changed files with 43 additions and 30 deletions
|
|
@ -180,12 +180,12 @@ proc rawRecv(q: PRawChannel, data: pointer, typ: PNimType) =
|
|||
storeAux(data, addr(q.data[q.rd * typ.size]), typ, q, mLoad)
|
||||
q.rd = (q.rd + 1) and q.mask
|
||||
|
||||
template lockChannel(q: expr, action: stmt) =
|
||||
template lockChannel(q: expr, action: stmt) {.immediate.} =
|
||||
acquireSys(q.lock)
|
||||
action
|
||||
releaseSys(q.lock)
|
||||
|
||||
template sendImpl(q: expr) =
|
||||
template sendImpl(q: expr) {.immediate.} =
|
||||
if q.mask == ChannelDeadMask:
|
||||
raise newException(EDeadThread, "cannot send message; thread died")
|
||||
acquireSys(q.lock)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue