Leaked semaphore objects - ๐Ÿ™€

Hi, Marc & fellow Scampsters.

Iโ€™m going through Marcโ€™s excellent video about using forks and I keep getting this message after every run:

/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 2 leaked semaphore objects to clean up at shutdown

warnings.warn('resource_tracker: There appear to be %d โ€™

What is this about, and how to I fix it?

Thanks!

David

Iโ€™m not sure how to track this down! Does anyone else encounter this warning outside of Thonny? Because I think i may be a Thonny-specific issue, but Iโ€™m not sure.

Oh, but I should also say, it doesnโ€™t seem to affect anything, I think, and you can ignore it. Itโ€™s just a bit annoying.

Thanks, Marc. When I saw Leaked semaphore objects I thought I was reading the summary from my last doctorโ€™s visit :confused:

@MarcEvanstein I did a bit of snooping online, and this seems to be a common problem. Itโ€™s not specific to Thonny because others have it using different IDEs. However, from the comments I read, it seems to be Mac-specific. Can anyone confirm?

Also, it happens only when I use fork(), so whatever fork calls (or uses?) has something to do with it.

A post was split to a new topic: NSWindow should only be instantiated on the main thread