Skip to content

Commit

Permalink
0.1.14: rm tsan warning
Browse files Browse the repository at this point in the history
  • Loading branch information
disruptek committed Feb 21, 2024
1 parent 7304f62 commit e01b52a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion loony.nimble
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "0.1.13"
version = "0.1.14"
author = "cabboose"
description = "Fast mpmc queue with sympathetic memory behavior"
license = "MIT"
Expand Down
3 changes: 2 additions & 1 deletion loony/node.nim
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ template compareAndSwapNext*(t: Node, expect: var uint, swap: uint): bool =
t.next.compareExchange(expect, swap, moRelaxed) # MO as per cpp impl

template compareAndSwapNext*(t: NodePtr, expect: var uint, swap: uint): bool =
(toNode t).next.compareExchange(expect, swap, moRelaxed) # MO as per cpp impl
# cpp impl is Relaxed; we use Release here to remove tsan warning
(toNode t).next.compareExchange(expect, swap, moRelease)

proc `=destroy`*(n: var Node) =
decDebugCounter()
Expand Down

0 comments on commit e01b52a

Please sign in to comment.