Skip to content

[viewer][macOS] Can't use env.replay/render because of a python multiprocessing error #793

Closed Answered by duburcqa
mwulfman asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, this behaviour is unfortunately expected on MacOS and Windows. The viewer is running in another process to prevent the GIL from getting on the way and slowdowning the main thread when the viewer is running. fork multiprocessing mode is not available on Windows and not the default on MacOS because it is not reliable on this OS (and pretty fragile overall). Because of this limitation, spawn is generally recommended. However, the latter requires guarding the main script behind if __name__ == '__main__':. This is not necessary with ipython because it hacking the multiprocessing library to use some kind of asyncio mechanism instead, so it manages sub-processes completely differently.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mwulfman
Comment options

Answer selected by mwulfman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants