From 30933a96390f8e31c3c9615060323b8cf4230ed4 Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Wed, 28 Nov 2012 00:17:02 -0500 Subject: [PATCH] Explain a bit more how longpolling works (imported from commit 26c4792f097d748edc725b4528c4d5904efd03c7) --- zephyr/views.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zephyr/views.py b/zephyr/views.py index 7292411de0..935d4284d1 100644 --- a/zephyr/views.py +++ b/zephyr/views.py @@ -449,7 +449,12 @@ def get_updates_backend(request, user_profile, handler, client_id, send_with_safety_check(resp, handler, **kwargs) return - # Now we're in long-polling mode + # Enter long-polling mode. + # + # Instead of responding to the client right away, leave our connection open + # and return to the Tornado main loop. One of the notify_* views will + # eventually invoke one of these callbacks, which will send the delayed + # response. def cb(**cb_kwargs): if handler.request.connection.stream.closed():