Skip to content

Commit

Permalink
channel send() condition variable lock ordering (#20879)
Browse files Browse the repository at this point in the history
  • Loading branch information
zevv authored Nov 21, 2022
1 parent fe43f75 commit 79b25a9
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 @@ -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.} =
Expand Down

0 comments on commit 79b25a9

Please sign in to comment.