-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add coroutine mutex #2095
Add coroutine mutex #2095
Conversation
I assume this waits for a mutex to be available? Can you help me understand what this is doing? |
thread won't block when wait for this lock. |
co_await mutex.lock(); If the lock is not acquired, it hangs and does not block the current thread |
I'm gonna use it in my code for testing. Hold on. |
How was your test? |
It works fine. But I don't have large concurrency. We need a volunteer to check the CAS implementation 🤪 |
Including the tasks queue in EventLoop? |
So should we merge this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
No description provided.