Skip to content

Conversation

@r1ru
Copy link
Contributor

@r1ru r1ru commented Dec 12, 2024

To make the current implementation of Barrier API compatible with other libraries like tokio, following changes were made.

  1. Modified Barrier::wait to return BarrierWaitResult
  2. Removed unnecessary Arc since it is common to use Barrier struct wrapped with Arc

See
https://doc.rust-lang.org/beta/std/sync/struct.Barrier.html
https://docs.rs/tokio/latest/tokio/sync/struct.Barrier.html

@r1ru r1ru requested a review from veqcc December 12, 2024 09:12
@veqcc
Copy link
Contributor

veqcc commented Dec 12, 2024

@r1ru
Could you write the description of this PR?
I do not recognize what is the problem and why this change is needed.

@ytakano
Copy link
Collaborator

ytakano commented Dec 12, 2024

Can you add test code like this?

fn test_simple_async_mutex() {

@r1ru r1ru requested a review from ytakano January 9, 2025 03:18
@ytakano ytakano merged commit 5901d2c into main Jan 9, 2025
1 check passed
@veqcc veqcc deleted the barrier_sync branch June 6, 2025 12:16
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.

4 participants