-
-
Notifications
You must be signed in to change notification settings - Fork 523
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #28356: Enhanced new build_many to use on all platforms
In #27490 I hacked together a replacement for the `sage_setup.docbuild.build_many` function, which implements (blocking) parallel map() of sorts, which solved some problems with using `multiprocessing.Pool.map` that stems from its use of threads to fork new processes. That solved a problem that was specific to older versions of Cygwin. However, there is a similar problem, which affects all platforms, with PARI built with multi-threading support: #26608. Although the PARI problem begs a more complete solution, at least for the docbuild we can get around it by using the `build_many` from #27490. This ticket makes some fixes and enhancements to `build_many`, so that it can also return a result from the function it runs. For the docbuild this feature is not strictly needed, except for the fact that it can also be used (as in `Pool.map`) to raise any exception that occurs in one of the worker processes. Thus, it's closer in functionality, at least for the purposes of the docbuild, to `Pool.map`. URL: https://trac.sagemath.org/28356 Reported by: embray Ticket author(s): Erik Bray Reviewer(s): Dima Pasechnik
- Loading branch information
Showing
2 changed files
with
136 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters