Menu

Using scheduler.peer_status

2016-05-13
2016-05-14
  • Oscar Curero

    Oscar Curero - 2016-05-13

    Hi,

    Questions about peer_status method:

    • How do I unsubscribe a coroutine from receiving connection messages from peer_status (without stopping the coroutine)?
    • Is not clear if more than one coroutine can be subscribed at the same time to peer_status.
    • If the previous answer is true, then how can I get a list of the coroutines subscribed to peer_status?

    Thanks!

     
  • Giridhar Pemmasani

    1. You can disable peer status messages with asyncoro.AsynCoro.instance().peer_status(None), or if you already have scheduler, with scheduler.peer_status(None).
    2. You can have at most one coroutine registered to receive peer status messages. Current status coroutine can relay these messages to other coroutines if necessary; see discoro_client2.py example where status_coro relays messages to rcoro_scheduler and httpd.
     

Log in to post a comment.