[Patches] [ python-Patches-648322 ] asyncore loop_once and remove poll2

SourceForge.net noreply at sourceforge.net
Tue Oct 21 08:58:36 EDT 2003


Patches item #648322, was opened at 2002-12-04 05:55
Message generated for change (Settings changed) made by akuchling
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=648322&group_id=5470

Category: Library (Lib)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Kjetil Jacobsen (kjetilja)
>Assigned to: A.M. Kuchling (akuchling)
Summary: asyncore loop_once and remove poll2

Initial Comment:
this patch does two things to asyncore.py, none of them should break any existing code which uses the module:

1) remove the (broken) poll2 function, and rather make a reference from poll2 to poll3 in the module namespace (i.e. if someone actually uses the poll2 function, poll3 will be called instead).

2) add a function loop_once which performs the asyncore loop once instead of until the socket map is empty.  asyncore.loop_once has the same function signature as asyncore.loop.





----------------------------------------------------------------------

Comment By: Kjetil Jacobsen (kjetilja)
Date: 2002-12-05 13:46

Message:
Logged In: YES 
user_id=5685

asyncore.poll2 is broken because it does not mask the EINTR exception when invoking the poll.poll function.  this causes asyncore.poll2 to not have the same semantics as asyncore.poll and asyncore.poll3.

i don't see the point in preserving support for the poll2 function, as the poll function is now automatically a part of the select module if the system has poll support.   or am i missing something obvious here? :)

if use_poll is set and there is no poll on the system, asyncore.loop and asyncore.loop_once will fail the same way they did before.  

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2002-12-05 11:49

Message:
Logged In: YES 
user_id=21627

Can you please explain in what way poll2 is broken?

Also, what happens if use_poll is set, but there is no poll 
available on the system?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=648322&group_id=5470



More information about the Patches mailing list