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
Shared mutable state and concurrency #49
Comments
I'm also curious what was the reasoning for changing actor in this commit? |
The mutex is not reentrant, that commit uses a re-entrant version of mutex, making it more easier to reason and implement coroutine safe code. |
Any thoughts on why I'm seeing results that imply the lock is not working as intended? |
I didn't realise you needed to create a new connection for every request. That was the cause of the problem. |
@Strydom new connection is not created for every request. |
|
That is just for the example. You can close the connection when your web app is exiting. |
I've tried that, and it didn't work for my bare bones version of your library, maybe i messed something up. Can you see anything wrong with my code? |
Hello,
I have tried to replicate a bare bones version of this library so that i can quickly extend and test new functionality like Streaming, SSL and AUTH.
The issue is, I'm observing unsafe access to the read channel when multiple clients are both reading and writing. Clients are reading responses from the writes (XADD, EXPIRE) instead of the XREAD, INFO etc.
Here is my bare bones code. Hopefully I have just copied something wrong / missed something, and it is not an underlying issue with the implementation 🤞
Bare bones code
The text was updated successfully, but these errors were encountered: