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=67933&view=auto
_______________________________________________
Zope3-users mailing list
[email protected]
http://mail.zope.org/mailman/listinfo/zope3-users
_______________________________________________
Zope3-users mailing list
[email protected]
http://mail.zope.org/mailman/listinfo/zope3-users