[Zope-dev] Re: Queue object in Zope products

Evan Simpson evan@4-am.com
Thu, 24 Oct 2002 09:38:59 -0500


Joost van Lawick wrote:
 > This basically works. However, if I put msg's in the queue with the
 > post method from a page template, and I do this a couple of times,
 > quickly, I get an attribute error on self._v_inqueue. It is somehow
 > gets lost. Does anyone know what I am doing wrong here? What happened
 > to the 'lost' queue?

'_v' attributes are stored on a per-database-connection basis, which is 
sort of like per-thread storage.  If you hit it several times quickly, 
you are likely to get served by a thread that has a copy of the object 
with no '_v_inqueue'.

At a quick glance, you could probably get around this by using a 
module-level registry of inqueues.

Cheers,

Evan @ 4-am