Skip to content

Conversation

@nathanielsimard
Copy link
Member

Since we're locking two contexts at the same time, deadlocks were possible. I added a device-kind lock, which fixes that problem while still keeping the convenience of having multiple mutable contexts locked at once.

Copy link
Member

@laggui laggui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small comment regarding the device state, otherwise LGTM

/edit: oh actually looks like clippy also flagged that 😄 and the CI is failing on doc but that's also the case on main

Comment on lines 382 to 385
state: Option<(
HashMap<Key, DeviceStateLock>,
HashMap<TypeId, Arc<ReentrantMutex<()>>>,
)>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make this into a type, will make field accesses more explicit too

@nathanielsimard nathanielsimard merged commit 7a4d97e into main Nov 14, 2025
5 checks passed
@nathanielsimard nathanielsimard deleted the fix/copy branch November 14, 2025 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants