[rabbitmq-discuss] timeout on pika.asyncore_loop

Marcin Krol mrkafk at gmail.com
Sun Jan 30 12:50:41 GMT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello everyone,

Apparently if pika.asyncore_loop() times out, there's no way of knowing
that for now:

def loop(map = None, count = None, timeout=None):
    if map is None:
        map = asyncore.socket_map
    if count is None:
        while (map or timer_heap):
            loop1(map, timeout)
    else:
        while (map or timer_heap) and count > 0:
            loop1(map, timeout)
            count = count - 1
        run_timers_internal()

Hint: it could be useful for asyncore_loop to return some info, e.g.
like whether timeout happened, specifically while calling like
asyncore_loop(count=something).


- --

Regards,
mk

- --
Premature optimization is the root of all fun.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNRV6hAAoJEFMgHzhQQ7hOpPoIAII6tAf9b31hzBvWkW6EY+Y/
GVuF9dW9KiAMA2St7pK1DCfELNCl6J5Y8dHIXump2YBGvTmb4PDiy6RbS4dHCS4f
SEpQqwRbAZJiYhgNEMR1HHSLOmmfISoR+Vk76nAqOjlJtounWPFyQ6lA6yBr2pO1
KMjDFAZxOm1+i1JV2gxW+LOWaD0qwYuKdN/ZlRRmvJeRDo4u4EUaiCsKQWJfYj7/
02RTqD0tU3Ye/5nfoSJrJYa23IvnaLAkqFzP6XHqHnrnPWjc5N1+FLcnz4aONja1
ncCYLqXbOAwUN3K/r9ZN09eJmn0eOgnIgw5z9dmcdnizTTdBYiokXH29cP9iD1U=
=Rjx5
-----END PGP SIGNATURE-----


More information about the rabbitmq-discuss mailing list