Thursday, October 25, 2012

How does threading and processes work in Django

Hi,

I'm new to Django and need some help understanding how threading works in Django. I have some data that I'd like to recompute periodically in the background and have it shared between requests. If I start a thread in one of the view functions (e.g. my_thread.start()), would Django kill this thread at some point? What if I start the thread in the main function before entering the server loop?
Does Django handle each request in a separate process with its own interpreter instance?
Where can I find a good explanation of how thread management works in Django?

Any pointers would be greatly appreciated!
Danyao


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/UlalOvj7a9EJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate