Friday, January 30, 2015

Do Signals block Django process?

I just added django-badges to my project. Basically it can award Badges if Users fullfill certain requirements. For this, everytime I call django-badges receives the post_save() signal and starts checking.

Now my project is similar to an online quiz, where users submit forms to answer questions. Right now I only have tested it locally and I'm not sure how to simulate multiple users accessing the page at the same time.

When later run on production in combination with a webserver, will Django spawn a new thread for each connection / user? Or will there be only one thread, so if two users are accessing the website, the 2nd has to wait until the request from the first user is processed?

Also what about my signal to process the badges. If I have a function that calls, which then signals to the badges module, will the execution of the original function stop until the signal has been processed or not?

def myView(request):
# signal emitted
# ...

So in this case, will the view be rendered immediately or only after the receiver for the signal has finished doing it's work? In my case I don't really need it to be asynchronous as long as the badge checking is fast enough and doesn't block the website for other users.

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment