diff --git a/HISTORY.md b/HISTORY.md index 12433ea5976fc..bf59f6da9659a 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -74,7 +74,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 public (but unexported) struct `Base.Lockable{T, L<:AbstractLock}` makes it easy to bundle a resource and its lock together ([#52898]). Build system changes -------------------- diff --git a/NEWS.md b/NEWS.md index a29fe2d43ab39..a84ecdd9ead1a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -94,6 +94,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 5564cdbe9bff2..1f0ccdf6b8c36 100644 --- a/base/exports.jl +++ b/base/exports.jl @@ -58,6 +58,7 @@ export IOBuffer, IOStream, LinRange, + Lockable, Irrational, LazyString, Matrix, diff --git a/test/misc.jl b/test/misc.jl index 5d11cf889858e..87605d685fb3e 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"