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

Make it work on macOS #23

Closed

Conversation

michele-brambilla
Copy link

This PR fixes a bug with semaphores not implemented in MacOS.
Currently, the library raises the exception

    File "[...]/multiprocessing/queues.py", line [...], in qsize
        return self._maxsize - self._sem._semlock._get_value()
NotImplementedError

on MacOS. A redefinition of Queue does the job.

@sochotnicky
Copy link

sochotnicky commented Aug 19, 2020

I don't have a Mac to test this on - but would replacing the qsize comparison:
self.mp_log_queue.qsize() != 0:
with
not self.mp_log_queue.empty()

Be a viable alternative? Python docs don't mention same warning about NotImplementedError in empty() method as in qsize so I expect it should work?

@kusha kusha mentioned this pull request Dec 2, 2020
@kusha kusha closed this in #26 Dec 2, 2020
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