From 1cd9848d0115a11ce8107dec773cb389a408f633 Mon Sep 17 00:00:00 2001 From: Eric Hanson <5846501+ericphanson@users.noreply.github.com> Date: Tue, 28 May 2024 11:59:00 +0200 Subject: [PATCH 1/4] update HISTORY.md for Lockable not being exported --- HISTORY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 8d876766c0aab..5174610134b8b 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -73,7 +73,7 @@ Multi-threading changes ----------------------- * `Threads.@threads` now supports the `:greedy` scheduler, intended for non-uniform workloads ([#52096]). -* A new exported struct `Lockable{T, L<:AbstractLock}` makes it easy to bundle a resource and its lock together ([#52898]). +* A new unexported struct `Lockable{T, L<:AbstractLock}` makes it easy to bundle a resource and its lock together ([#52898]). Build system changes -------------------- From f761f0f867f081552aa6b2d477666d0e3078047e Mon Sep 17 00:00:00 2001 From: Eric Hanson <5846501+ericphanson@users.noreply.github.com> Date: Tue, 28 May 2024 12:04:29 +0200 Subject: [PATCH 2/4] export Lockable --- NEWS.md | 1 + base/exports.jl | 1 + 2 files changed, 2 insertions(+) diff --git a/NEWS.md b/NEWS.md index b5c304714d878..e84347e420634 100644 --- a/NEWS.md +++ b/NEWS.md @@ -73,6 +73,7 @@ New library features * `tempname` can now take a suffix string to allow the file name to include a suffix and include that suffix in the uniquing checking ([#53474]) * `RegexMatch` objects can now be used to construct `NamedTuple`s and `Dict`s ([#50988]) +* `Lockable` is now exported ([#54595]) Standard library changes ------------------------ diff --git a/base/exports.jl b/base/exports.jl index fc2ee86a8d0d4..926a0693674ae 100644 --- a/base/exports.jl +++ b/base/exports.jl @@ -58,6 +58,7 @@ export IOBuffer, IOStream, LinRange, + Lockable, Irrational, LazyString, Matrix, From 52f6cea43a99dafcac1d046a9b23553e884eb520 Mon Sep 17 00:00:00 2001 From: Eric Hanson <5846501+ericphanson@users.noreply.github.com> Date: Tue, 28 May 2024 12:13:21 +0200 Subject: [PATCH 3/4] Update HISTORY.md --- HISTORY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 5174610134b8b..0f12951345049 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -73,7 +73,7 @@ Multi-threading changes ----------------------- * `Threads.@threads` now supports the `:greedy` scheduler, intended for non-uniform workloads ([#52096]). -* A new unexported struct `Lockable{T, L<:AbstractLock}` makes it easy to bundle a resource and its lock together ([#52898]). +* A new public (but unexported) struct `Base.Lockable{T, L<:AbstractLock}` makes it easy to bundle a resource and its lock together ([#52898]). Build system changes -------------------- From ee7fa00d42600290d4f0864bed41a73fa730fd4e Mon Sep 17 00:00:00 2001 From: Eric Hanson <5846501+ericphanson@users.noreply.github.com> Date: Sun, 9 Jun 2024 00:30:11 +0200 Subject: [PATCH 4/4] fix test --- test/misc.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/misc.jl b/test/misc.jl index 6c2f0f89135fd..e6199afacbcc7 100644 --- a/test/misc.jl +++ b/test/misc.jl @@ -132,7 +132,7 @@ end # Lockable{T, L<:AbstractLock} using Base: Lockable let - @test_broken Base.isexported(Base, :Lockable) + @test Base.isexported(Base, :Lockable) lockable = Lockable(Dict("foo" => "hello"), ReentrantLock()) # note field access is non-public @test lockable.value["foo"] == "hello"