Reimundo Heluani
unread,Jul 25, 2020, 8:46:17 AM7/25/20Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sage-...@googlegroups.com
Hello, I'm implementing a worker pool using Python's multiprocessing module.
My tests run fine under the Sage interactive interpreter or the Jupyter
notebook, but they fail with a MemoryError as if I have ran out of available
threads when running the unit tests with "sage -t"
RuntimeError: can't start new thread
I suppose this is because "sage -t" open new processes before running the
tests. Where in the code should I start looking to debug this, I'd like to
implement this in a way that the actual tests are run by "sage -t". I mean I
could bypass this problem by checking if the current process is the main
process before forking the worker pool, but the problem of this approach is
that the environment would be different on a run of "sage -t" and on a run
in the interactive interpreter, so I would lose the functionality of the
docstring tests.
Best,
R.