event,request: queue pending events per device - #33
Merged
Conversation
ids1024
reviewed
Jul 30, 2026
| pub struct EisRequestConverter { | ||
| requests: VecDeque<EisRequest>, | ||
| pending_requests: VecDeque<EisRequest>, | ||
| pending_requests: HashMap<Device, VecDeque<EisRequest>>, // keyed by the device |
Owner
There was a problem hiding this comment.
We should probably make sure to remove entries when a device is removed.
Maybe it would be better to have a Mutex<VecDeque<EisRequest>> in DeviceInner. A bit annoying to need to lock a mutex when we only use it in the thread owning the EisRequestConverter but that might be a bit better.
Contributor
Author
There was a problem hiding this comment.
I can do that.
That would definitely be annoying though!
Contributor
Author
There was a problem hiding this comment.
Moved it inside the device, with a mutex.
ids1024
reviewed
Jul 30, 2026
Comment on lines
+296
to
+299
| // Should be unreachable | ||
| // TODO: how do we handle this? | ||
| log::warn!("reis: timestamped request with no device; delivering unframed"); | ||
| self.requests.push_back(request); |
Owner
There was a problem hiding this comment.
Since it should be statically impossible, a panic is appropriate.
hojjatabdollahi
force-pushed
the
hojjat/device-queue
branch
from
July 30, 2026 00:44
3aaff04 to
dd554c9
Compare
Contributor
Author
|
Alright, it's now explicitly clearing the queue. |
hojjatabdollahi
force-pushed
the
hojjat/device-queue
branch
from
July 30, 2026 01:25
dd554c9 to
68f190e
Compare
2 tasks
ids1024
approved these changes
Jul 30, 2026
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.
Based on discussion in Smithay/smithay#2115