mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
channel send() condition variable lock ordering (#20879)
(cherry picked from commit 79b25a911b)
This commit is contained in:
committed by
narimiran
parent
7e80df2267
commit
7e7b35b5c0
@@ -360,8 +360,8 @@ proc sendImpl(q: PRawChannel, typ: PNimType, msg: pointer, noBlock: bool): bool
|
||||
|
||||
rawSend(q, msg, typ)
|
||||
q.elemType = typ
|
||||
releaseSys(q.lock)
|
||||
signalSysCond(q.cond)
|
||||
releaseSys(q.lock)
|
||||
result = true
|
||||
|
||||
proc send*[TMsg](c: var Channel[TMsg], msg: sink TMsg) {.inline.} =
|
||||
|
||||
Reference in New Issue
Block a user