From: Eric S. Raymond Date: Sat, 30 Nov 2013 19:29:45 +0000 (-0500) Subject: Remove unecessary elaboration. X-Git-Tag: 2.3~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6ad44a20d3f4ddb91b6c2fc970abcddf5f5c5a27;p=irker.git Remove unecessary elaboration. --- diff --git a/irkerd b/irkerd index 8fc1d65..a05d0bb 100755 --- a/irkerd +++ b/irkerd @@ -121,12 +121,12 @@ class IRCClient(): self.server_connections.append(conn) return conn - def spin(self, predicate=None, timeout=0.2): + def spin(self, timeout=0.2): "Spin processing data from connections forever." # Outer loop should specifically *not* be mutex-locked. # Otherwise no other thread would ever be able to change # the shared state of an IRC object running this function. - while predicate is None or predicate(): + while True; with self.mutex: connected = [x for x in self.server_connections if x is not None and x.socket is not None]