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

Guard against concurrent access of the queues when using multiple tasks #26

Closed
wants to merge 1 commit into from
Closed

Conversation

mathieucarbou
Copy link

@mathieucarbou mathieucarbou commented Jan 11, 2024

I currently have some random crashes due to the fact that the queues in the WS implementation are accessed from different RTOS tasks. I've placed some locks today, now trying to run it for a while to see if it crashed again in the queue loop. So far, a few hours without crash.
I am pushing 1 or 2 ws events each second and the app can also react based on incoming ws events.
This seems to work but I am not sure if there is a more efficient way to fix that.

I've opened this PR as draft because I'd like to test it for a few days.

Code inspired by:

@mathieucarbou
Copy link
Author

good news, no crash during all night! I will continue testing for longer time. I usually got a crash per hour caused by these concurrent access.

@mathieucarbou mathieucarbou deleted the ws-lock branch January 12, 2024 17:31
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.

1 participant