##// END OF EJS Templates
Channels can no longer be restarted.
Brian Granger -
Show More
@@ -44,14 +44,13 b' class ZmqSocketChannel(Thread):'
44 44 self.socket = None
45 45
46 46 def stop(self):
47 """ Stop the thread's activity. Returns when the thread terminates.
47 """Stop the thread's activity. Returns when the thread terminates.
48
49 The thread will raise :class:`RuntimeError` if :method:`self.start`
50 is called again.
48 51 """
49 52 self.join()
50 53
51 # Allow the thread to be started again.
52 # FIXME: Although this works (and there's no reason why it shouldn't),
53 # it feels wrong. Is there a cleaner way to achieve this?
54 Thread.__init__(self)
55 54
56 55 def get_address(self):
57 56 """ Get the channel's address. By the default, a channel is on
@@ -65,7 +64,7 b' class ZmqSocketChannel(Thread):'
65 64 or None, in which case the address is reset to its default value.
66 65 """
67 66 # FIXME: Validate address.
68 if self.is_alive():
67 if self.is_alive(): # This is Thread.is_alive
69 68 raise RuntimeError("Cannot set address on a running channel!")
70 69 else:
71 70 if address is None:
General Comments 0
You need to be logged in to leave comments. Login now