Support for platforms where multiprocessing does not work #173
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
Currently trying to run pythontex on android gives an error due to multiprocessing not working. There's been plenty of discussion on how to deal with this in other python projects, see for example pypa/pip#8161.
With this PR we check if multiprocessing is supported and else set
multiprocessing=False. When later creating list of tasks to run we
then choose to either run pool.apply_async(function), or to just
eval(function).
Error message when currently running pythontex
I have not updated pythontex2.py, mainly due to that 99 % of all users running into this problem will be using the terminal emulator termux (as I am) where python3 is already the default python version.
Let me know if you are not happy with the code format, associated comments or if I should fix something else in the commits!