XML-RPC returning value before executing all function code
问题 I have XML-RPC server: import time import xmlrpclib from SimpleXMLRPCServer import SimpleXMLRPCServer class Worker(object): def start_work(self): # is it possible do return value to client here? self.do_work() return 'we started!' def do_work(self): while(True): print 'I\'m doing work...' time.sleep(3) if __name__ == '__main__': port = 8080 server = SimpleXMLRPCServer(("localhost", port)) print "Listening on port %s..." % port w = Worker() server.register_function(w.start_work) while(1):