sagemath/sage

RESetMapReduceWorker.steal doctest times out on Python 3.7

Opened this issue · 4 comments

On Python 3.7, this doctest times out:

sage: from sage.parallel.map_reduce import RESetMPExample, RESetMapReduceWorker
sage: from threading import Thread
sage: EX = RESetMPExample(maxl=6)
sage: EX.setup_workers(2)

sage: w0, w1 = EX._workers
sage: w0._todo.append(42)
sage: thief0 = Thread(target=w0._thief, name="Thief")
sage: thief0.start()

sage: w1.steal()
42
sage: w0._todo
deque([])

CC: @hivert @slel

Component: misc

Keywords: map_reduce, timeout

Issue created by migration from https://trac.sagemath.org/ticket/27537

slel commented
comment:1

With what version of Sage does the doctest time out? Is it still the case?

slel commented

Description changed:

--- 
+++ 
@@ -1,18 +1,18 @@
 On Python 3.7, this doctest times out:
 
 ```
-            sage: from sage.parallel.map_reduce import RESetMPExample, RESetMapReduceWorker
-            sage: from threading import Thread
-            sage: EX = RESetMPExample(maxl=6)
-            sage: EX.setup_workers(2)
+sage: from sage.parallel.map_reduce import RESetMPExample, RESetMapReduceWorker
+sage: from threading import Thread
+sage: EX = RESetMPExample(maxl=6)
+sage: EX.setup_workers(2)
 
-            sage: w0, w1 = EX._workers
-            sage: w0._todo.append(42)
-            sage: thief0 = Thread(target = w0._thief, name="Thief")
-            sage: thief0.start()
+sage: w0, w1 = EX._workers
+sage: w0._todo.append(42)
+sage: thief0 = Thread(target=w0._thief, name="Thief")
+sage: thief0.start()
 
-            sage: w1.steal()
-            42
-            sage: w0._todo
-            deque([])
+sage: w1.steal()
+42
+sage: w0._todo
+deque([])
 ```
slel commented

Changed keywords from none to map_reduce, timeout

comment:2

As the Sage-8.8 release milestone is pending, we should delete the sage-8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage-8.9).