channel send() condition variable lock ordering (#20879)

(cherry picked from commit 79b25a911b)
This commit is contained in:
Ico Doornekamp
2022-11-21 13:11:28 +01:00
committed by narimiran
parent 7e80df2267
commit 7e7b35b5c0

View File

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