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

Is there a reason parallel_read_safe is set to False? #147

Open
jdillard opened this issue Sep 8, 2022 · 4 comments
Open

Is there a reason parallel_read_safe is set to False? #147

jdillard opened this issue Sep 8, 2022 · 4 comments

Comments

@jdillard
Copy link

jdillard commented Sep 8, 2022

Are there known reasons why parallel_read_safe is set to False as opposed to True, as done in #124? Or was it just the safest option to suppress the warning at the time? If possible, it would be nice to have this extension not block parallel building.

For reference, the PHP domain has their parallel_read_safe set to True.

@joeced
Copy link
Collaborator

joeced commented Sep 11, 2022

No, there is no specific reason. I took the safe choice. We could try to see if it's a problem, I can always revert it, if it does not work :). In https://www.sphinx-doc.org/en/master/extdev/index.html#extension-metadata in states that the core logic of the extension should be able to run in parallel. I cannot guarantee this. :(.
If we could check or ensure that the data structures cannot be be mixed up, I would say go for it, but until then, no.

@jdillard
Copy link
Author

Sounds good. I'll try to experiment with setting parallel_read_safe to True in a fork and report back (only anecdotal evidence, but a start I guess)

@zouhairm
Copy link

@jdillard - any updates on running with parallel_read_safe=True ?

@jdillard
Copy link
Author

Well the testing didn't go well:

Exception occurred:
File "/path/to/python3.9/site-packages/sphinx/util/parallel.py", line 111, in terminate
  self._result_funcs.pop(tid)
  KeyError: 0

I haven't seen that happen before, and this is the closest related thing I could find based on the error message: sphinx-doc/sphinx#9210

As mentioned before, this is just anecdotal so recommend other people try as well before jumping to any conclusions.

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

No branches or pull requests

3 participants