Skip to content
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

Fix Unsound Send/Sync bound for Device and DeviceHandle #45

Merged
merged 1 commit into from
Jan 4, 2021

Conversation

a1ien
Copy link
Owner

@a1ien a1ien commented Dec 22, 2020

As mention #44 UsbContext trait has neither Send nor Sync bound and can be implemented from the user side. This permits writing a custom non-thread safe UsbContext implementation in safe Rust code, which can cause a data race when used with Device or DeviceHandle.
So required UsbContext implement Send + Sync

Fix #44

As mention #44 UsbContext trait has neither Send nor Sync bound and can be implemented from the user side. This permits writing a custom non-thread safe UsbContext implementation in safe Rust code, which can cause a data race when used with Device or DeviceHandle.
So required UsbContext implement Send + Sync
@a1ien a1ien changed the title Fix Unsound Send/Sync bound Fix Unsound Send/Sync bound for Device and DeviceHandle Dec 22, 2020
@a1ien a1ien merged commit 3aa7df7 into master Jan 4, 2021
@a1ien a1ien deleted the fix_unsound_usbcontext branch July 26, 2021 09:32
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.

Unsound Send/Sync bound for Device and DeviceHandle
1 participant