[Python-checkins] python/dist/src/Lib asyncore.py,1.50,1.51

loewis at users.sourceforge.net loewis at users.sourceforge.net
Thu Jun 3 05:18:37 EDT 2004


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16680/Lib

Modified Files:
	asyncore.py 
Log Message:
Patch #957240: Add count parameter to asyncore.loop.


Index: asyncore.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/asyncore.py,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51
*** asyncore.py	21 Mar 2004 20:03:18 -0000	1.50
--- asyncore.py	3 Jun 2004 09:18:34 -0000	1.51
***************
*** 158,162 ****
  poll3 = poll2                           # Alias for backward compatibility
  
! def loop(timeout=30.0, use_poll=False, map=None):
      if map is None:
          map = socket_map
--- 158,162 ----
  poll3 = poll2                           # Alias for backward compatibility
  
! def loop(timeout=30.0, use_poll=False, map=None, count=1e309):
      if map is None:
          map = socket_map
***************
*** 167,172 ****
          poll_fun = poll
  
!     while map:
          poll_fun(timeout, map)
  
  class dispatcher:
--- 167,173 ----
          poll_fun = poll
  
!     while map and count >= 0:
          poll_fun(timeout, map)
+         count = count - 1
  
  class dispatcher:




More information about the Python-checkins mailing list