-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent dangling pointers being left in the system's polling mechanim…
… and reduce the amount of unsafe code in the library (#76) * Prevent dangling pointers being left in the system's polling mechanism and reduce the amount of unsafe code in the library. Previously, dropping a source without unregistering it risked leaving a dangling pointer to token memory in the underlying polling mechanism. Now, the Poller type is responsible for keeping track of what data the system's poller (eg. epoll) is still pointing to, and maintaining ownership of it. This commit also slightly reduces the amount of unsafe code related to pointer dereferences and adds some notes justifying the safety of these operations. Co-authored-by: Victor Berger <vberger@users.noreply.github.com>
- Loading branch information
Showing
6 changed files
with
184 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.