CozySynthesizer / cozy

The collection synthesizer
https://cozy.uwplse.org
Apache License 2.0
209 stars 18 forks source link

Resource leak fixes #123

Closed Calvin-L closed 4 years ago

Calvin-L commented 4 years ago

This fixes warnings on Python 3.8 of the form:

/usr/local/Cellar/python@3.8/3.8.4/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 14 leaked semaphore objects to clean up at shutdown

The fix is a bit dangerous since fresh_name() now has a much weaker contract: uniqueness is not guaranteed across processes. I have tentatively convinced myself that the uses of fresh_name in workers are safe; however, it is difficult to track down all of them.