Skip to content

Conversation

GadgetSteve
Copy link

Address #576

@GadgetSteve
Copy link
Author

Also fixed Examples/wordcloud_cn.py

jieba.enable_parallel(4)
# Setting up parallel processes :4 ,but unable to run on Windows
import sys
try:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can do an if __name__ == "__main__" that should fix that, I think?

@amueller
Copy link
Owner

amueller commented Aug 1, 2020

Thanks for the PR! I restarted the CI that had some random issue,
For multiprocessing in windows, you can put the whole example into an if __name__ == __main__ block or put it in a function and then protect a call to the function that way.

@GadgetSteve
Copy link
Author

GadgetSteve commented Aug 1, 2020 via email

@amueller
Copy link
Owner

amueller commented Aug 3, 2020

Yes, but it will only be true in the main process and so multiprocessing should work.

@amueller
Copy link
Owner

amueller commented Aug 3, 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