summary refs log tree commit diff stats
path: root/lib/system
diff options
context:
space:
mode:
authorIco Doornekamp <ico@zevv.nl>2022-11-21 13:11:28 +0100
committerGitHub <noreply@github.com>2022-11-21 13:11:28 +0100
commit79b25a911be36da87aa012b23e854a3bed01833c (patch)
tree973d41791caa7adddccf5500061b3077f9b4db69 /lib/system
parentfe43f751eb9a83f84cc93aa0d752c3658232002d (diff)
downloadNim-79b25a911be36da87aa012b23e854a3bed01833c.tar.gz
channel send() condition variable lock ordering (#20879)
Diffstat (limited to 'lib/system')
-rw-r--r--lib/system/channels_builtin.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/system/channels_builtin.nim b/lib/system/channels_builtin.nim
index 50d740b23..fbe3f0e98 100644
--- a/lib/system/channels_builtin.nim
+++ b/lib/system/channels_builtin.nim
@@ -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.} =