That is because you didn't read the example properly. The
threading.local() instance is meant to be at global scope in module.

# Global !!!!!!!
local = threading.local()

def application(environ, start_response):

    try:
       db = local.db
    except:
       local.db = _mysql.connect('127.0.0.1','root','root','www')
       db = local.db

Graham

2008/10/6 gert <[EMAIL PROTECTED]>:
>
> it works can't wait to benchmark it :)
>
> http://code.google.com/p/appwsgi/source/browse/trunk/www/lib/db.py
>
> aldo i don't know if it really really works.
> also i think the __del__ methode actually deletes it anyway every
> request ?
> >
>

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

Reply via email to