classification
Title: IOCP Proactor same socket overlapped callbacks
Type: Stage: commit review
Components: Versions: Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Jim.Jewett, tontinton
Priority: normal Keywords: patch

Created on 2020-07-08 17:20 by tontinton, last changed 2020-08-30 05:01 by Jim.Jewett.

Pull Requests
URL Status Linked Edit
PR 21399 open tontinton, 2020-07-08 17:37
Messages (4)
msg373324 - (view) Author: Tony (tontinton) * Date: 2020-07-08 17:20
In IocpProactor I saw that the callbacks to the functions recv, recv_into, recvfrom, sendto, send and sendfile all give the same callback function for when the overlapped operation is done.

I just wanted cleaner code so I made a static function inside the class that I give to each of these functions as the overlapped callbacks.
msg373533 - (view) Author: Jim Jewett (Jim.Jewett) * (Python triager) Date: 2020-07-11 18:41
Looks good to me.  

I at first worried that the different function names were useful metadata that was getting lost -- but the names were already duplicated in several cases.  *If* that is still a concern for the committer, then instead of repeating the code (as current production does), each section should just say newname=origname before registering the static method (as the patch does), and should bind a distinct name for each usage.
msg373534 - (view) Author: Tony (tontinton) * Date: 2020-07-11 18:47
I feel like the metadata is not really a concern here. I like when there is no code duplication :)
msg376081 - (view) Author: Tony (tontinton) * Date: 2020-08-29 21:21
bump
History
Date User Action Args
2020-08-30 05:01:41Jim.Jewettsetstage: patch review -> commit review
2020-08-29 21:21:02tontintonsetmessages: + msg376081
2020-07-11 18:47:15tontintonsetmessages: + msg373534
2020-07-11 18:41:55Jim.Jewettsetnosy: + Jim.Jewett

messages: + msg373533
versions: + Python 3.10
2020-07-08 17:37:58tontintonsetkeywords: + patch
stage: patch review
pull_requests: + pull_request20547
2020-07-08 17:20:08tontintoncreate