You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IOCP Proactor same socket overlapped callbacks #85418
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.
jimjjewett commented on Jul 11, 2020
jimjjewettmannequin
Mannequin
More actions
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.
Activity
tontinton commentedon Jul 8, 2020
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.
jimjjewett commentedon Jul 11, 2020
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.
tontinton commentedon Jul 11, 2020
I feel like the metadata is not really a concern here. I like when there is no code duplication :)
tontinton commentedon Aug 29, 2020
bump