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

Fixed the timer/iodevice race between iodevice free and epoll arming the device #74

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

hkadayam
Copy link
Contributor

IOManager tests are passed

@hkadayam hkadayam linked an issue Jan 31, 2024 that may be closed by this pull request
@hkadayam hkadayam requested a review from sanebay January 31, 2024 15:57
io_device_ptr m_msg_iodev; // iodev for the messages
folly::UMPSCQueue< iomgr_msg*, false > m_msg_q; // Q of message for this thread
std::unordered_map< IODevice*, shared< IODevice > > m_removed_iodevs; // Pending IODevices to be removed from epoll
bool m_event_processing_phase{false}; // Are epoll events are being processed now
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

atomic not needed ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All structures in reactor runs within the thread. So no need of atomic.

@hkadayam hkadayam added this to the MileStone4.1 milestone Jan 31, 2024
Copy link

@sanebay sanebay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hkadayam hkadayam merged commit 95a9b1c into eBay:master Jan 31, 2024
12 checks passed
@hkadayam hkadayam deleted the timer_race branch January 31, 2024 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IOMgr Timer cancel race condition
2 participants