Re: [Zope3-Users] Re: Reportlab threadsafe solution?
Chris McDonough wrote: Why not just use a mutex (a recursive lock makes things easier too)? Yeah, Big Fat Lock has been my solution with Reportlab, worked well under high load for several years. I don't use RLocks myself, paranoia says they're not big or fat enough ;-) Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Reportlab threadsafe solution?
Why not just use a mutex (a recursive lock makes things easier too)? lock = threading.RLock() lock.acquire() try: ... finally: lock.release() On Sep 26, 2006, at 9:19 AM, Philipp von Weitershausen wrote: Jim Washington wrote: Hi I need to produce PDFs with reportlab. reportlab is not threadsafe. (http://two.pairlist.net/pipermail/ reportlab-users/2006-June/005037.html) I think I need a way to queue or generate a lockfile on requests for PDFs so that only one-at-a-time is generated. I'm hoping that there is a utility for this already, but search in the source for queue or serialize or lock gets me a lot of stuff that does not seem to relate to what I want. This looks like it would be a relatively simple utility. Has this been done yet? Any hints? You may want to look at zc.queue: http://svn.zope.org/zc.queue/ trunk/src/zc/queue/queue.txt?rev=67933view=auto ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users