Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOCP Proactor same socket overlapped callbacks #85418

Closed
tontinton mannequin opened this issue Jul 8, 2020 · 4 comments
Closed

IOCP Proactor same socket overlapped callbacks #85418

tontinton mannequin opened this issue Jul 8, 2020 · 4 comments
Labels
3.10 only security fixes 3.11 only security fixes 3.12 bugs and security fixes topic-asyncio

Comments

@tontinton
Copy link
Mannequin

tontinton mannequin commented Jul 8, 2020

BPO 41246
Nosy @JimJJewett, @tontinton
PRs
  • bpo-41246: IOCP Proactor same socket overlapped callbacks #21399
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2020-07-08.17:20:08.338>
    labels = ['3.10']
    title = 'IOCP Proactor same socket overlapped callbacks'
    updated_at = <Date 2020-08-30.05:01:41.656>
    user = 'https://github.com/tontinton'

    bugs.python.org fields:

    activity = <Date 2020-08-30.05:01:41.656>
    actor = 'Jim.Jewett'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = []
    creation = <Date 2020-07-08.17:20:08.338>
    creator = 'tontinton'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 41246
    keywords = ['patch']
    message_count = 4.0
    messages = ['373324', '373533', '373534', '376081']
    nosy_count = 2.0
    nosy_names = ['Jim.Jewett', 'tontinton']
    pr_nums = ['21399']
    priority = 'normal'
    resolution = None
    stage = 'commit review'
    status = 'open'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue41246'
    versions = ['Python 3.10']

    @tontinton
    Copy link
    Mannequin Author

    tontinton mannequin commented 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
    Copy link
    Mannequin

    jimjjewett mannequin commented 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.

    @jimjjewett jimjjewett mannequin added the 3.10 only security fixes label Jul 11, 2020
    @tontinton
    Copy link
    Mannequin Author

    tontinton mannequin commented Jul 11, 2020

    I feel like the metadata is not really a concern here. I like when there is no code duplication :)

    @tontinton
    Copy link
    Mannequin Author

    tontinton mannequin commented Aug 29, 2020

    bump

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @kumaraditya303 kumaraditya303 added topic-asyncio 3.11 only security fixes 3.12 bugs and security fixes labels Oct 14, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 only security fixes 3.11 only security fixes 3.12 bugs and security fixes topic-asyncio
    Projects
    Status: Done
    Development

    No branches or pull requests

    1 participant