Skip to content

Commit

Permalink
channel send() condition variable lock ordering (#20879)
Browse files Browse the repository at this point in the history
(cherry picked from commit 79b25a9)
  • Loading branch information
zevv authored and narimiran committed Apr 26, 2023
1 parent 7e80df2 commit 7e7b35b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/system/channels_builtin.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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.} =
Expand Down

0 comments on commit 7e7b35b

Please sign in to comment.