Skip to content

Commit 8156f8e

Browse files
committed
Make global variables const instead.
1 parent 2a4ca0a commit 8156f8e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sync.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Sync
2-
global mutex = ReentrantLock()
3-
global sync_level = repeat([ 0 ], Threads.nthreads())
2+
const mutex = ReentrantLock()
3+
const sync_level = repeat([ 0 ], Threads.nthreads())
44

55
@inline is_locked() = sync_level[Threads.threadid()] > 0
66

0 commit comments

Comments
 (0)