| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
I think there is an unused local, but otherwise good to merge.
Sorry, something went wrong.
|
It's still used by the TemporaryDirectory call. |
Sorry, something went wrong.
Previously, a race condition could occur if, while a process had called make_tex (generating the tex file in the global cache) and was going to call the latex subprocess (to generate the dvi file), another process also called make_tex for the same tex string and started rewriting the tex source. In that case, the latex subprocess could see a partially written (invalid) tex source. Fix that by generating the tex source in a process-private temporary directory, where the latex process is already going to run anyways. (This is cheap compared to the latex subprocess invocation.) Apply a similar strategy for make_png as well.
|
I chose to also fix make_png here as well. |
Sorry, something went wrong.
…_dvi & make_png. Includes an extra fix from PR matplotlib#30431: Don't drop dpi in png filename generation.
Backport PR #30426: Fix a race condition in TexManager.make_dvi & make_png.
| Back | FazBrowse Home | New Git URL |
Previously, a race condition could occur if, while a process had called make_tex (generating the tex file in the global cache) and was going to call the latex subprocess (to generate the dvi file), another process also called make_tex for the same tex string and started rewriting the tex source. In that case, the latex subprocess could see a partially written (invalid) tex source.
Fix that by generating the tex source in a process-private temporary directory, where the latex process is already going to run anyways. (This is cheap compared to the latex subprocess invocation.)
See #30420 (comment) (point (2)).
Edit: did the same to make_png.
PR summary
PR checklist