Hi all, 


I am trying to modify the original simple_switch application so that it has a 
daemon thread doing the statistic request periodically. 
So, in the __init__ of class SimpleSwitch I add self.thread = 
hub.spawn(self._ststistic_request) where _statistic_request is a function 
defined in the class SimpleSwitch. It looks like:


def _statistic_request(self):
        while True:
                hub.sleep(1)

                # make statistic request
                ......


My question is that is this the right way to do this? And what would happen if 
there is a confliction of packet in and this periodic thread. Will the 
application handle packet in first?


Thank you!


Best,
An
                
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to