We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
TaskLocalValue
1 parent d61478b commit 160a7beCopy full SHA for 160a7be
src/types.jl
@@ -81,7 +81,7 @@ function exprtype(x::BasicSymbolic)
81
end
82
83
84
-const wvd = WeakValueDict{UInt, BasicSymbolic}()
+const wvd = TaskLocalValue{WeakValueDict{UInt, BasicSymbolic}}(WeakValueDict{UInt, BasicSymbolic})
85
86
# Same but different error messages
87
@noinline error_on_type() = error("Internal error: unreachable reached!")
@@ -525,7 +525,7 @@ function BasicSymbolic(s::BasicSymbolic)::BasicSymbolic
525
return s
526
527
h = hash2(s)
528
- t = get!(wvd, h, s)
+ t = get!(wvd[], h, s)
529
if t === s || isequal_with_metadata(t, s)
530
t
531
else
0 commit comments