On Fri, Mar 27, 2009 at 5:54 AM, Darren Dale <dsdal...@gmail.com> wrote:
> > It might not be too much trouble to protect RcParams and its data, although > I dont know how disruptive it would be to the mpl codebase and to users for > rcParams to begin returning copies of things like font lists. > In addition to the rc params, I suspect some of the caching we do at the module level, eg in agg class RendererAgg(RendererBase): texd = maxdict(50) # a cache of tex image rasters _fontd = maxdict(50) might be what is hurting here. Karen, could you try editing site-packages/matplotlib/backends/backend_agg.py and moving these two lines into the __init__method so they are at the instance level rather than the class level. Eg, def __init__(self, width, height, dpi): if __debug__: verbose.report('RendererAgg.__init__', 'debug-annoying') RendererBase.__init__(self) self.texd = maxdict(50) # a cache of tex image rasters self._fontd = maxdict(50) and see if that helps. Also, make sure you have disabled usetex in matplotlibrc, since the use of the filesystem for caching the tex datafiles is probably not thread safe. My guess is that the font cache on the file system is not thread safe either, but this may only affect the first run of mpl after a clean install. Also, as Eric suggests, a freestanding script which is thread enabled (preferably just using mpl and the standard threading library rather than django et al) which uses the agg backend that we could use for debugging would be very helpful. JDH
------------------------------------------------------------------------------
_______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel