Patches item #914096, was opened at 2004-03-11 04:55
Message generated for change (Comment added) made by josiahcarlson
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=914096&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: Python 2.3
>Status: Closed
>Resolution: Out of Date
Priority: 5
Private: No
Submitted By: alejandro david weil (aweil)
Assigned to: Josiah Carlson (josiahcarlson)
Summary: Little (improvement and standarization) to asyncore.

Initial Comment:
changes: 
1- uses add/del_channel/setup_socket functions. 
Adding calls to them instead of pasting its functionallity 
inside dispatcher's code. 
 
2- added dispatcher's handle_connect_event() function. 
It's now, one place to overwrite when transparent 
wrapping dispatcher. 
 And replaced code like: 
        self.handle_connect() 
        self.connected = 1 
to: 
        handle_connect_event() 
 
3- looponce() function added. 
 
 
2 allowes to implement ssldispatcher, with little work. 
And, of course, it seems to be usefull for anyone who 
wants to subclass dispatcher. 
 
3 I used it for when I don't want to keep looping until 
connections are finished. Don't know if it's against the 
asyncore principies. 
 
Also, I decided to make this changes because I found 
things like: handle_connect() was called, and sometimes 
connected were setup to 1 before, and sometimes after 
the call. I'll expect these changes could make it work in 
a predecible way! 

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

>Comment By: Josiah Carlson (josiahcarlson)
Date: 2007-03-07 00:46

Message:
Logged In: YES 
user_id=341410
Originator: NO

Changes to the poll method were done at least a year and a half ago that
*added* actual error checking, rather than removing the stub.

The looponce() function is unnecessary due to changes for 2.4 or 2.5 that
added an optional "count" argument to loop().

There is some positive stuff in the create_socket/set_socket stuff, but
I've integrated it with some other changes I'm going to be posting
shortly.

A variant of the close() modifications were done a while ago.

The handle_connect_event is an idea, I had included equivalent semantics
in other code I had written, but moving it to a method is better.

I'm going to reject the patch as out of date, as most of the issues were
previously taken care of.  Those ideas that help, I have added them to an
updated asyncore that I will be posting soon.

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

Comment By: Josiah Carlson (josiahcarlson)
Date: 2007-03-06 08:33

Message:
Logged In: YES 
user_id=341410
Originator: NO

Yes, this would be my baby now.  A brief reading of the description of the
patch suggests that portions were previously committed.  Will look at later
today.

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

Comment By: Martin v. Löwis (loewis)
Date: 2007-03-06 06:48

Message:
Logged In: YES 
user_id=21627
Originator: NO

As Andrew didn't respond positively, trying somebody else: Josiah, is it
your?

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

Comment By: Raymond Hettinger (rhettinger)
Date: 2004-03-13 12:30

Message:
Logged In: YES 
user_id=80475

Andrew, is this module your baby now?

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=914096&group_id=5470
_______________________________________________
Patches mailing list
[email protected]
http://mail.python.org/mailman/listinfo/patches

Reply via email to