forked from InsightSoftwareConsortium/ITK
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG: Do not create global multiprocessing RLock
This addresses: > /opt/conda/lib/python3.6/multiprocessing/semaphore_tracker.py:143: UserWarning: semaphore_tracker: There appear to be 1 leaked semaphores to clean up at shutdown len(cache)) Reported in Project-MONAI/MONAI#1629 Here we adopt the approach in tqdm: tqdm/tqdm#617 to address the similar issues with PyTorch: tqdm/tqdm#611 but for our use case. A global set of locks is added to the class on first use. We also add a threading lock in addition to a multiprocessing lock.
- Loading branch information
Showing
1 changed file
with
69 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters