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

This commit is contained in:
Ico Doornekamp
2022-11-21 13:11:28 +01:00
committed by GitHub
parent fe43f751eb
commit 79b25a911b

View File

@@ -363,8 +363,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.} =