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.
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
feat: Initial x11rb-async implementation #790
feat: Initial x11rb-async implementation #790
Changes from 1 commit
5ab999e
0cbe0db
7ce3b11
2b01fe6
5b369dd
fe5dc05
2a13cef
ef0e3d9
ebeb06d
f8bf805
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well.... depends on your definition of "block". This does not perform I/O, but it does lock a mutex (which is supposed not to be held for long). I guess this is fine, right?
(Same comment for other "Doesn't block"-comments)
Edit: Actually, this is generic code. I could implement the trait with something that just sleeps for 5 minutes. But I guess it's not worth caring about such malicious implementations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's not like anything unsound can happen if this blocks. It's just that, unless there's a buggy/malicious implementation on our hands (which we shouldn't assume), it shouldn't block for a protracted period of time.
Also, it's fine to lock
std::sync::Mutex
es in async code as long as you don't hold their guards acrossawait
points, see this point in thetokio
documentation.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't read the new
cookies.rs
yet, butx11rb
'sCookie
has aninto_sequence_number()
for the above sequence.Edit: ....that is only
pub(crate)
, but could still be good enough for this use here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think we might want to expose that method as
pub
.