Public » MiniRedis Read More
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

forking from a thread crashes Python, so MiniRedis is no longer a thread

Changeset c60d1792f0e9

Parent c8799f11def4

by Profile picture of Benjamin PollackBenjamin Pollack

Changes to one file · Browse files at c60d1792f0e9 Showing diff from parent c8799f11def4 Diff from another changeset...

Change 1 of 4 Show Entire File miniredis.py Stacked
 
11
12
13
14
15
16
17
 
40
41
42
43
 
44
45
46
 
154
155
156
157
158
159
160
 
290
291
292
293
294
 
295
296
297
 
11
12
13
 
14
15
16
 
39
40
41
 
42
43
44
45
 
153
154
155
 
156
157
158
 
288
289
290
 
 
291
292
293
294
@@ -11,7 +11,6 @@
 import select  import socket  import sys -import threading    class RedisError(object):   def __init__(self, message): @@ -40,7 +39,7 @@
  self.db = None   self.table = None   -class MiniRedis(threading.Thread): +class MiniRedis(object):   def __init__(self, host='127.0.0.1', port=6379, log_file=None, db_file=None):   super(MiniRedis, self).__init__()   self.host = host @@ -154,7 +153,6 @@
    def stop(self):   self.halt = True - self.join()     # HANDLERS   @@ -290,8 +288,7 @@
  elif o == '-d':   db_file = os.path.abspath(a)   m = MiniRedis(host=host, port=port, log_file=log_file, db_file=db_file) - m.start() - m.join() + m.run()    if __name__ == '__main__':   main(sys.argv[1:])