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

SpiBusDriver is not Send #395

Open
leonardodanelutti opened this issue Mar 19, 2024 · 1 comment
Open

SpiBusDriver is not Send #395

leonardodanelutti opened this issue Mar 19, 2024 · 1 comment

Comments

@leonardodanelutti
Copy link

Is there a reason why Send is implemented for SpiDeviceDriver and not for a SpiBusDriver? From the documentation there seems to be no difference between a SpiBusDriver without cs and a SpiBusDriver.

@ivmarkov
Copy link
Collaborator

ivmarkov commented Apr 30, 2024

This should be fixed. PRs welcome!

Background: All drivers should be Send but currently few (if any) are Sync. We can actually also do the latter too for most drivers because it turns out most esp idf APIs are thread safe.

But usually folks reaching out to Sync often means they might be doing something suboptimal, as in - say - trying to use the default tokio work-stealing executor, which is not ideal on embedded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants