No you cannot and you should not. In web2py you have one thread per http 
request. You should not spawn other threads because you either slow down 
responses or you may leak memory.
This is not web2py specific. This is true for all web applications.

What is your ultimate goal? There is probably a proper way to do what you 
need.

On Thursday, 28 November 2019 13:07:56 UTC-8, Marc Legendre wrote:
>
> Hello,
>
> I would like to access to the db variable declared in db.py in another 
> thread but I get this error:
>
> AttributeError: 'thread._local' object has no attribute 
> '_pydal_connection_140400076448208_2359
>
> Despite a lot of research, I can't find a way to make it work. Does anyone 
> has an idea of how to counter this problem ?
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/ed1a7c2b-8888-43f3-bf58-7f173df5675c%40googlegroups.com.

Reply via email to