Make nix::sys::termios::Termios implement Sync and Copy.#1324
Open
jimblandy wants to merge 1 commit intonix-rust:masterfrom
Open
Make nix::sys::termios::Termios implement Sync and Copy.#1324jimblandy wants to merge 1 commit intonix-rust:masterfrom
nix::sys::termios::Termios implement Sync and Copy.#1324jimblandy wants to merge 1 commit intonix-rust:masterfrom
Conversation
Author
|
(I tried to fix the cfg-ed out code, too, but if I got it all right I'll be surprised...) |
508c7c9 to
805e8fe
Compare
Author
|
Yeah, I missed a case, and that's causing the FreeBSD failure. The |
805e8fe to
8b097a5
Compare
Author
asomers
reviewed
Nov 11, 2020
It's kind of tough that `Termios` doesn't implement `Sync`, because then you can't use them with the `signal_hook` crate's `register` function, or any other signal-handling wrapper that tries to be safe. This approach probably entails a bit more copying bits around, but I'd argue the convenience of `Sync` and `Copy` implementations is worth it.
8b097a5 to
e0dab6a
Compare
Author
mkj
added a commit
to mkj/sunset
that referenced
this pull request
Aug 15, 2024
Workaround until nix-rust/nix#1324 merges
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It's kind of tough that
Termiosdoesn't implementSync, because then youcan't use them with the
signal_hookcrate'sregisterfunction, or any othersignal-handling wrapper that tries to be safe.
This approach probably entails a bit more copying bits around, but I'd argue the
convenience of
SyncandCopyimplementations is worth it.