diff --git a/docs/v0.1.0/.documenter-siteinfo.json b/docs/v0.1.0/.documenter-siteinfo.json index 56348cd..8061f40 100644 --- a/docs/v0.1.0/.documenter-siteinfo.json +++ b/docs/v0.1.0/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2024-05-02T16:35:27","documenter_version":"1.4.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2024-05-13T15:00:01","documenter_version":"1.4.0"}} \ No newline at end of file diff --git a/src/formats.jl b/src/formats.jl index 1803100..e031975 100644 --- a/src/formats.jl +++ b/src/formats.jl @@ -1009,15 +1009,17 @@ end # For avoiding callbacks when calling Julia from another language. function begin_write_lock(action::Function, format::FormatReader)::Any thread_id = threadid() - @assert format.internal.writer_thread[1] != thread_id - - lock(format.internal.lock) - try - format.internal.writer_thread[1] = thread_id - return action() - catch - end_write_lock(format) - rethrow() + if format.internal.writer_thread[1] == thread_id + return action() # untested + else + lock(format.internal.lock) + try + format.internal.writer_thread[1] = thread_id + return action() + catch + end_write_lock(format) + rethrow() + end end end diff --git a/src/writers.jl b/src/writers.jl index d39661a..52344ce 100644 --- a/src/writers.jl +++ b/src/writers.jl @@ -214,6 +214,7 @@ function delete_axis!(daf::DafWriter, axis::AbstractString; must_exist::Bool = t Formats.invalidate_cached!(daf, Formats.axis_names_cache_key()) Formats.format_increment_version_counter(daf, axis) Formats.format_delete_axis!(daf, axis) + delete!(daf.internal.axes, axis) return nothing end