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

PacketsBuffer_s is thread unsafe though used in different threads without any mutexes #22

Open
iurii-provizio opened this issue Jul 4, 2022 · 3 comments

Comments

@iurii-provizio
Copy link

PacketsBuffer_s (src/PandarGeneralRaw/include/pandarGeneral/pandarGeneral_internal.h) is used for pushing by one thread and reading by another, without any synchronisation primitives such as mutex. It's very thread-unsafe and causes real problems, like #19 and #17

It has to be protected either internally (i.e. made multithread-safe) or externally (i.e. there should be a mutex getting locked every time there is any access to PacketsBuffer_s to read or write).

@iurii-provizio
Copy link
Author

See also 909a3bc

@anchuanxu
Copy link

Hi,I've tried your method, but it doesn't seem to be working. Is there any solution?

@anchuanxu
Copy link

Hi problem has been solved, thank you for your method. I improved on your method and submitted the PRhttps://github.com//pull/23. Good luck.

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

2 participants