diff --git a/src/sage/parallel/decorate.py b/src/sage/parallel/decorate.py index 8195a440fa2..a01d680bdcc 100644 --- a/src/sage/parallel/decorate.py +++ b/src/sage/parallel/decorate.py @@ -516,8 +516,6 @@ def fork(f=None, timeout=0, verbose=False): sage: @fork(timeout=0.1, verbose=True) ....: def g(n, m): return factorial(n).ndigits() + m - sage: g(5, m=5) - 8 sage: g(10^7, m=5) Killing subprocess ... with input ((10000000,), {'m': 5}) which took too long 'NO DATA (timed out)' diff --git a/src/sage/parallel/map_reduce.py b/src/sage/parallel/map_reduce.py index d284d41e252..303f7405416 100644 --- a/src/sage/parallel/map_reduce.py +++ b/src/sage/parallel/map_reduce.py @@ -1136,21 +1136,12 @@ def start_workers(self): sage: from sage.parallel.map_reduce import RESetMapReduce sage: def children(x): ....: print(f"Starting: {x}", flush=True) - ....: sleep(float(0.5)) - ....: print(f"Finished: {x}", flush=True) ....: return [] sage: S = RESetMapReduce(roots=[1, 2], children=children) sage: S.setup_workers(2) - sage: S.start_workers(); sleep(float(0.4)) + sage: S.start_workers(); sleep(float(5)) # long time Starting: ... Starting: ... - sage: [w.is_alive() for w in S._workers] - [True, True] - sage: sleep(float(1.5)) - Finished: ... - Finished: ... - sage: [not w.is_alive() for w in S._workers] - [True, True] Cleanup::