-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Line 268 in 9f285dd
| let mut barrier = Barrier::new(2, "barrier_test_notleader", client); |
You have to configure the same number in all constructors, which is easily to be made an error and not very user-friendly. Think about another approach.
Maybe can be set only from first barrier or only leader. Otherwise ignored.
Problem is, that you not know, which code will be executed first, so any use needs to set a barrier. The first init sets the leader and the limit for all others.
Other solution could be: If there are 2 different values for waiting clients, it results in an error in wait statement, because this is the first call or a check in init. Could be okay, because only a one-time check.
Metadata
Metadata
Assignees
Labels
No labels