Hi All,

in the "install" function of pyswitch - I am starting a thread
[thread.start_new_thread ()], which makes a socket connection to another
server and sends some data every 1 second.

I am observing that the thread is started but cannot send the data every 1
second... it is not scheduled for 5-10 seconds....and sends data randomly
with lot of delay.

Is there something wrong I am doing? or is there a scheduler where I need to
register the thread ? (an app level thread scheduler) or twisted etc is
interfering ?

Any help is appreciated as I am new to python.

Thanks a lot,
Vishal

For running: I have modified pyswitch.py and restarted the nox_core with
it..

The function is below:
def serveclient(self):
    print 'serveclient'
    print self.host,self.port
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.connect((self.add_host,self.add_port))
    print "connected"
    while 1:
        s.send('test data')
        time.sleep(1)
    s.close()
_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev

Reply via email to