diff --git a/.travis.yml b/.travis.yml index 17700ba..90b1e69 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,9 +5,8 @@ os: - osx julia: - 1.0 - - 1.1 - - 1.2 - 1.3 + - 1.6 - nightly notifications: email: false diff --git a/Project.toml b/Project.toml index 1fe2319..644a77d 100644 --- a/Project.toml +++ b/Project.toml @@ -2,7 +2,7 @@ name = "MemPool" uuid = "f9f48841-c794-520a-933b-121f7ba6ed94" license = "MIT" desc = "a simple distributed data store" -version = "0.3.4" +version = "0.3.5" [deps] DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" diff --git a/appveyor.yml b/appveyor.yml index 4331147..cfaf75f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,10 +1,9 @@ environment: matrix: - julia_version: 1.0 - - julia_version: 1.1 - - julia_version: 1.2 - julia_version: 1.3 - - julia_version: latest + - julia_version: 1.6 + - julia_version: nightly platform: - x86 # 32-bit diff --git a/src/lock.jl b/src/lock.jl index ec84655..665a865 100644 --- a/src/lock.jl +++ b/src/lock.jl @@ -22,11 +22,17 @@ end Base.unlock(nrl::NonReentrantLock) = unlock(nrl.rl) +if VERSION >= v"1.7.0-DEV" +# as of v1.7 locks in Base disable finalizers +enable_finalizers(on::Bool) = nothing +else # NonReentrantLock may be taken around code that might call the GC, which might # reenter through finalizers. Avoid that by temporarily disabling finalizers # running concurrently on this thread. enable_finalizers(on::Bool) = ccall(:jl_gc_enable_finalizers, Cvoid, (Ptr{Cvoid}, Int32,), Core.getptls(), on) +end + macro safe_lock(l, ex) quote temp = $(esc(l))