On Fri, 2006-10-13 at 11:18 -0700, pako wrote:
> It is possible to run view method in new thread?
> For example if i have
> 
> (r'^items/(?P<category>\d)/$', 'cyber.core.views.list_items')
> 
> and function list_items do sleep(10) a new requests to django
> application will not be acceptable, cause main thread is currently
> sleeping by list_items function.
> So any ideas?

No, Django doesn't have a built-in facility to do this. It just doesn't
make a lot of sense for the web-page presentation side of a framework.

If you have a task that is going to do a heavy computation, it is up to
you to fork off a new process or run it in a thread. Since you can put
anything you like in your view, this means you can choose whatever
library or code you want to manage this dispatching.

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to