-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ndk/looper: Add
remove_fd()
method (#416)
We've previously only been able to unregister file descriptors by using a callback and returning `false` from it to be unregistered. Add the missing method that allows users to unregister their file descriptors from the looper for any reason. There has always been a "concern" about leaking the `Box` inside `add_fd_with_callback()`, but this is already very easy by never returning `false` from the callback or registering a different callback / event on the same `fd`, so this new function doesn't really expose that.
- Loading branch information
Showing
2 changed files
with
32 additions
and
2 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