Skip to content

added lock to put_image in ndtiff dataset. Heavy threaded writing did…#178

Merged
henrypinkard merged 1 commit intomicro-manager:mainfrom
LukasMicroscopy:adding-lock-for-thread-safety
Mar 10, 2026
Merged

added lock to put_image in ndtiff dataset. Heavy threaded writing did…#178
henrypinkard merged 1 commit intomicro-manager:mainfrom
LukasMicroscopy:adding-lock-for-thread-safety

Conversation

@LukasMicroscopy
Copy link
Contributor

… lead to double file creation and corrupted files. The lock solves this.
When ndtiff-dataset was used in a threaded way (A python thread writes images with put_image whenever one is available in a queue). Occasionally, the ndtiff file where corrupted or two new ndtiff file writer where created at once. The lock prevents the execution of the put_image function twice, before the last one finished. This happens even with global interpreter lock, since the execution of the function is not serialized

… lead to double file creation and corrupted files. The lock solves this.
@henrypinkard henrypinkard enabled auto-merge March 27, 2025 16:08
@henrypinkard henrypinkard merged commit a14b126 into micro-manager:main Mar 10, 2026
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants