Ticket #8785: trac_8785.patch

File trac_8785.patch, 746 bytes (added by was, 11 years ago)
  • sage/parallel/multiprocessing_sage.py

    # HG changeset patch
    # User William Stein <wstein@gmail.com>
    # Date 1272401823 25200
    # Node ID 93fef997d588fafd64e95d1f8c61cfc68e1ff54b
    # Parent  e2ccb846f2962cbe254f534ececfd0fbc9ff5045
    trac 8785 -- avoid subtle interaction between importing multiprocessing and twisted
    
    diff --git a/sage/parallel/multiprocessing_sage.py b/sage/parallel/multiprocessing_sage.py
    a b  
    5858        sage: v.sort(); v
    5959        [(((2,), {}), 4), (((3,), {}), 6)]
    6060    """
     61    from twisted.internet import reactor   # do not delete this (!)  -- see trac 8785
     62   
    6163    if processes == 0: processes = ncpus.ncpus()
    6264    p = Pool(processes)
    6365    fp = pickle_function(f)