From c9dafc0e461a509740048fd46682e7a158de97da Mon Sep 17 00:00:00 2001 From: Beforerr Date: Fri, 9 Oct 2026 13:45:58 -0600 Subject: [PATCH 1/2] fix: lock lazy decompressor pool init on Julia < 1.12 --- src/CommonDataFormat.jl | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/CommonDataFormat.jl b/src/CommonDataFormat.jl index 9f7eed8..4130c00 100644 --- a/src/CommonDataFormat.jl +++ b/src/CommonDataFormat.jl @@ -21,15 +21,20 @@ export is_record_varying return chnl end else + # First called inside `@threads`; unlocked, racing workers each build a pool and one + # deadlocks returning its decompressor to the other, already full, pool. const _decompressors = Ref{Union{Channel{Decompressor},Nothing}}(nothing) + const _decompressors_lock = ReentrantLock() function decompressors() - if _decompressors[] === nothing - n_ch = nthreads() - chnl = Channel{Decompressor}(n_ch) - foreach(i -> put!(chnl, Decompressor()), 1:n_ch) - _decompressors[] = chnl + @lock _decompressors_lock begin + if _decompressors[] === nothing + n_ch = nthreads() + chnl = Channel{Decompressor}(n_ch) + foreach(i -> put!(chnl, Decompressor()), 1:n_ch) + _decompressors[] = chnl + end + return _decompressors[] end - return _decompressors[] end __init__() = _decompressors[] = nothing end From 8710657e361bd39d84b4df6edfd8fcb6d74f5a64 Mon Sep 17 00:00:00 2001 From: Beforerr Date: Fri, 9 Oct 2026 13:45:58 -0600 Subject: [PATCH 2/2] =?UTF-8?q?build(release):=20=F0=9F=94=96=200.4.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 1c9169c..f0b3cf9 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "CommonDataFormat" uuid = "a9737db6-c05c-4e48-868b-6bc41491d9d9" -version = "0.4.2" +version = "0.4.3" authors = ["Beforerr and contributors"] [workspace]