Title: --
Hi Anand.  I'm not sure exactly what you mean by db dereferencing.  Can you elaborate?

Anand wrote:
+        GOTCHA: Until the foreground task ends, any db access by
background task
+        will necessarily get old data from before the foreground task
started
+        because psycopg2 begins a transaction in the foreground task
until it quits """
    

This could be fixed by doing explicitly dereferencing db in  
web.background.

      def internal(*a, **kw):
          web.data() # cache it

+        web.ctx.db = None
          tmpctx = web._context[threading.currentThread()]
          web._context[threading.currentThread()] = utils.storage 
(web.ctx.copy())



  

--

Berwyn Hoyt, Senior Hardware Engineer: [EMAIL PROTECTED]
Ph: +64 3 359 2101; Mobile: +64 21 045 7830
Brush Technology: www.brush.co.nz


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to