Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiprocessing.queues.Queue.qsize raises NotImplementedError on macOS #101094

Closed
curonny opened this issue Jan 16, 2023 · 3 comments
Closed

multiprocessing.queues.Queue.qsize raises NotImplementedError on macOS #101094

curonny opened this issue Jan 16, 2023 · 3 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@curonny
Copy link

curonny commented Jan 16, 2023

def qsize(self):
# Raises NotImplementedError on Mac OSX because of broken sem_getvalue()
return self._maxsize - self._sem._semlock._get_value()

I use macos, i can't use multiprocessing for this reason

@curonny curonny added the type-bug An unexpected behavior, bug, or error label Jan 16, 2023
@ericvsmith
Copy link
Member

You’d have to do some research to see if sem_getvalue is still broken on macOS. Maybe raise an issue with Apple?

@zware
Copy link
Member

zware commented Jan 17, 2023

Also, as the documentation warns, the value returned by qsize isn't reliable even on platforms that implement sem_getvalue, and macOS might not be the only platform that doesn't. We have configure tests checking for sem_getvalue and whether it is "broken" for multiprocessing's purposes, so I presume that macOS's is still broken.

This doesn't seem like a bug worth chasing in Python, but if you can show that sem_getvalue does now work as expected in macOS and can provide a patch to fix it (probably by fixing the configure check), we can reopen the issue.

@zware zware closed this as not planned Won't fix, can't repro, duplicate, stale Jan 17, 2023
@zware zware changed the title in Queue class multiprocessing.queues.Queue.qsize raises NotImplementedError on macOS Jan 17, 2023
@jm-nab
Copy link

jm-nab commented Sep 27, 2024

for anyone else that finds themselves here, a possible workaround can be found here: keras-team/autokeras#368 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

4 participants