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

Add coroutine mutex #2095

Merged
merged 1 commit into from
Aug 8, 2024
Merged

Add coroutine mutex #2095

merged 1 commit into from
Aug 8, 2024

Conversation

fantasy-peak
Copy link
Contributor

No description provided.

@an-tao an-tao requested review from hwc0919 and marty1885 July 17, 2024 08:48
@marty1885
Copy link
Member

I assume this waits for a mutex to be available? Can you help me understand what this is doing?

@hwc0919
Copy link
Member

hwc0919 commented Jul 17, 2024

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.

@fantasy-peak
Copy link
Contributor Author

I assume this waits for a mutex to be available? Can you help me understand what this is doing?

co_await mutex.lock(); If the lock is not acquired, it hangs and does not block the current thread

@hwc0919
Copy link
Member

hwc0919 commented Jul 26, 2024

I'm gonna use it in my code for testing. Hold on.

@an-tao
Copy link
Member

an-tao commented Aug 6, 2024

I'm gonna use it in my code for testing. Hold on.

How was your test?

@hwc0919
Copy link
Member

hwc0919 commented Aug 6, 2024

It works fine. But I don't have large concurrency.

We need a volunteer to check the CAS implementation 🤪

@an-tao
Copy link
Member

an-tao commented Aug 6, 2024

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?

@an-tao
Copy link
Member

an-tao commented Aug 6, 2024

It works fine. But I don't have large concurrency.

We need a volunteer to check the CAS implementation 🤪

So should we merge this PR?

Copy link
Member

@marty1885 marty1885 left a 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

@an-tao an-tao merged commit c46f149 into drogonframework:master Aug 8, 2024
34 checks passed
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.

None yet

4 participants