5

The server starts fine I can update values, but the hello world string is not printed. The program is stuck at t.start(), how can I make it non-blocking.

import rpyc
class rpyc_service(rpyc.Service):
    def on_connect(self):
        self.exposed_var = 0
    def on_disconnect(self):
        pass
   def exposed_update_var(self, val):
       self.exposed_var = val

if __name__ == '__main__':
    from rpyc.utils.server import ThreadedServer
    t = ThreadedServer(rpyc_service, port = 18861)
    t.start()
    # The hello world section is never printed
    print "Hello world"
  • I offloaded section in main before print to a new thread, now its working without blocking, if anyone else has a better solution. let me please know. – Pradheesh Shanmugam Jan 05 '16 at 08:41

0 Answers0