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

Are the read and write functions of Serial thread-safe? #305

Open
Mq-b opened this issue Nov 13, 2024 · 1 comment
Open

Are the read and write functions of Serial thread-safe? #305

Mq-b opened this issue Nov 13, 2024 · 1 comment

Comments

@Mq-b
Copy link

Mq-b commented Nov 13, 2024

Are the read and write functions of Serial thread-safe?
Because I want to read and write the serial port is independent, I should not need protection? But I'm not sure if the object itself is thread-safe?

@Mq-b
Copy link
Author

Mq-b commented Nov 13, 2024

https://github.com/wjwwood/serial/blob/57f7277/src/impl/unix.cc#L1048-L1082

I saw pthread_mutex in the source code but I'm still not sure how much of a guarantee there is?

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

No branches or pull requests

1 participant