Skip to content

Potential race condition of event registration and adding waker? #23

@npuichigo

Description

@npuichigo

@cfsamson Would it be possible that after the interest is registered, the reactor quickly get the event and tries to call wake, but waker has not been added since lock here. Now that epoll is edge-level here, the event will never be received again so never wake the executor. I'm not sure if I'm right.

runtime::reactor().register(stream, Interest::READABLE, id);
runtime::reactor().set_waker(waker, self.id);

Metadata

Metadata

Assignees

No one assigned

    Labels

    second editionIssues that should be considered for an eventual second edition of the book

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions