]> granicus.if.org Git - python/commitdiff
Back out #957240.
authorMartin v. Löwis <martin@v.loewis.de>
Mon, 14 Jun 2004 04:58:42 +0000 (04:58 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Mon, 14 Jun 2004 04:58:42 +0000 (04:58 +0000)
Doc/lib/libasyncore.tex
Lib/asyncore.py
Misc/NEWS

index f466fa6bdc30edd5af7dae5c8e81ecdf72a69ade..89c717810bcaa90e4d0e1a276ebb968833166918 100644 (file)
@@ -44,20 +44,20 @@ channel (including any that have been added to the map during asynchronous
 service) is closed.
 
 \begin{funcdesc}{loop}{\optional{timeout\optional{, use_poll\optional{,
-                       map\optional{,count}}}}}
-  Enter a polling loop that terminates after count passes or all open
-  channels have been closed.  All arguments are optional.  The \var(count)
-  parameter defaults to infinity, resulting in the loop terminating only
-  when all channels have been closed.  The \var{timeout} argument sets the
-  timeout parameter for the appropriate \function{select()} or
-  \function{poll()} call, measured in seconds; the default is 30 seconds.
-  The \var{use_poll} parameter, if true, indicates that \function{poll()}
-  should be used in preference to \function{select()} (the default is
-  \code{False}).  The \var{map} parameter is a dictionary whose items are
-  the channels to watch.  As channels are closed they are deleted from their
-  map.  If \var{map} is omitted, a global map is used (this map is updated
-  by the default class \method{__init__()} -- make sure you extend, rather
-  than override, \method{__init__()} if you want to retain this behavior).
+                       map}}}}
+  Enter a polling loop that only terminates after all open channels
+  have been closed.  All arguments are optional.  The \var{timeout}
+  argument sets the timeout parameter for the appropriate
+  \function{select()} or \function{poll()} call, measured in seconds;
+  the default is 30 seconds.  The \var{use_poll} parameter, if true,
+  indicates that \function{poll()} should be used in preference to
+  \function{select()} (the default is \code{False}).  The \var{map} parameter
+  is a dictionary whose items are the channels to watch.  As channels
+  are closed they are deleted from their map.  If \var{map} is
+  omitted, a global map is used (this map is updated by the default
+  class \method{__init__()}
+  -- make sure you extend, rather than override, \method{__init__()}
+  if you want to retain this behavior).
 
   Channels (instances of \class{asyncore.dispatcher}, \class{asynchat.async_chat}
   and subclasses thereof) can freely be mixed in the map.
index b687fd2cdb3db7fe76700bbcc8470559dc9f4d70..69318c88b9bf3b093ea1237439f9f901f3a2529f 100644 (file)
@@ -157,7 +157,7 @@ def poll2(timeout=0.0, map=None):
 
 poll3 = poll2                           # Alias for backward compatibility
 
-def loop(timeout=30.0, use_poll=False, map=None, count=1e309):
+def loop(timeout=30.0, use_poll=False, map=None):
     if map is None:
         map = socket_map
 
@@ -166,9 +166,8 @@ def loop(timeout=30.0, use_poll=False, map=None, count=1e309):
     else:
         poll_fun = poll
 
-    while map and count >= 0:
+    while map:
         poll_fun(timeout, map)
-        count = count - 1
 
 class dispatcher:
 
index bf808b5da37c7d0bdacfca84c1519296587569ea..20a1042220f4bf0a39a5f4ff88144d9bc847d59b 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -349,8 +349,6 @@ Library
 - refactored site.py into functions.  Also wrote regression tests for the
   module.
 
-- asyncore.loop now has repeat count parameter that defaults to infinity.
-
 - The distutils sdist command now ignores all .svn directories, in
   addition to CVS and RCS directories.  .svn directories hold
   administrative files for the Subversion source control system.