#6927: Extend CachedFunction to handle disk-cache
---------------------------+------------------------------------------------
Reporter: boothby | Owner: boothby
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-feature
Component: misc | Keywords: cache database
Author: boothby | Upstream: N/A
Reviewer: Tim Dumol | Merged:
Work_issues: |
---------------------------+------------------------------------------------
Comment(by mpatel):
V2 of the combined patch is an attempt to work around an absolute import
problem with `sage -startuptime`. Diff of the diffs:
{{{
#!diff
@@ -639,7 +639,7 @@ diff --git a/sage/parallel/multiprocessi
-from processing import Pool
+from __future__ import absolute_import
+
-+from multiprocessing import Pool
++import multiprocessing
from functools import partial
from sage.misc.fpickle import pickle_function, call_pickled_function
-import ncpus
@@ -647,8 +647,12 @@ diff --git a/sage/parallel/multiprocessi
def pyprocessing(processes=0):
"""
-@@ -62,7 +64,7 @@ def parallel_iter(processes, f, inputs):
- p = Pool(processes)
+@@ -59,10 +61,10 @@ def parallel_iter(processes, f, inputs):
+ [(((2,), {}), 4), (((3,), {}), 6)]
+ """
+ if processes == 0: processes = ncpus.ncpus()
+- p = Pool(processes)
++ p = multiprocessing.Pool(processes)
fp = pickle_function(f)
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6927#comment:11>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.