Not sure I understand the question.
Let's say you create a "test" application with a simple "default.py"
controller:
def index(): return "hello world"
This is already a multithreaded application. Every time an http
request for "http://localhost:8000/test/default/index" arrives, a new
thread is created by the web2py web server.
It is the web server that creates threads (at every request) and kills
them (when they take too long). The web server is often even smarter
than that and reuses existing threads.
threads created this way can share information using one of the
following mechanisms:
1) database (db=SQLDB(....))
2) cache (cache.disk, cache.ram, cache.memcache)
3) session (session.myvariable=3)
4) filesystem (open(os.path.join(request.folder,'private/
myfile.txt),'w').write('hello'))
You should not create threads manually by using thread and threading
modules.
Massimo
On Oct 26, 11:24 am, tommy <[EMAIL PROTECTED]> wrote:
> I tried to run some tasks every certain minutes in the background for
> my WEB2PY application. I created another thread, but my web page
> screen was stuck there for ever. Can someone tell me how to write
> multthreaded GUI application in web2py?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---