Skip to content

Commit

Permalink
Bug fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
orenbenkiki committed May 13, 2024
1 parent ffd9556 commit da6d62d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/v0.1.0/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2024-05-02T16:35:27","documenter_version":"1.4.0"}}
{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2024-05-13T15:00:01","documenter_version":"1.4.0"}}
20 changes: 11 additions & 9 deletions src/formats.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/writers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit da6d62d

Please sign in to comment.