tmultithreaded - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 3203dc093464b5e3f3bc210203f17301e0e162a7 DIR parent 619875a14d3d25c07995f48b47d6a078a9843f7e HTML Author: ThomasV <thomasv@gitorious> Date: Fri, 23 Dec 2011 13:59:20 +0300 multithreaded Diffstat: M server/server.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- DIR diff --git a/server/server.py b/server/server.py t@@ -654,8 +654,10 @@ def irc_thread(): def jsonrpc_thread(store): # see http://code.google.com/p/jsonrpclib/ + from SocketServer import ThreadingMixIn from jsonrpclib.SimpleJSONRPCServer import SimpleJSONRPCServer - server = SimpleJSONRPCServer(('localhost', 8080)) + class SimpleThreadedJSONRPCServer(ThreadingMixIn, SimpleJSONRPCServer): pass + server = SimpleThreadedJSONRPCServer(('localhost', 8080)) server.register_function(lambda : peer_list.values(), 'peers') server.register_function(cmd_stop, 'stop') server.register_function(cmd_load, 'load')