Skip to content

Comments

Fix #230: Modify Barrier::wait to return BarrierWaitResult#254

Merged
ytakano merged 13 commits intomainfrom
barrier_sync
Jan 9, 2025
Merged

Fix #230: Modify Barrier::wait to return BarrierWaitResult#254
ytakano merged 13 commits intomainfrom
barrier_sync

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.

3 participants