A countdown latch that will signal when the counter reaches zero. More...
Instance Methods | |
| (int) | - count |
| Gets the current count on the latch. More... | |
| (void) | - decrement |
| Decrements the counter by one and signals if it reaches zero. More... | |
| (NSString *) | - description |
| Generates a string description of this instance. More... | |
| (instancetype) | - init |
| Creates a new instance of the latch with an unknown count. More... | |
| (instancetype) | - initWithInitialCount: |
| Creates a new instance of the latch with a count. More... | |
| (void) | - reset |
| Resets the latch with an unknown count. More... | |
| (void) | - resetWithInitialCount: |
| Resets the latch with a count. More... | |
| (void) | - setCount: |
| Sets the counter for the latch. More... | |
| (FMLiveSwitchFuture< id > *) | - waitAsync |
| Returns a promise that resolves once the counter reaches zero. More... | |
| (void) | - waitSync |
| Blocks until the counter reaches zero. More... | |
Class Methods | |
| (FMLiveSwitchManagedCountdownLatch *) | + managedCountdownLatch |
| Creates a new instance of the latch with an unknown count. More... | |
| (FMLiveSwitchManagedCountdownLatch *) | + managedCountdownLatchWithInitialCount: |
| Creates a new instance of the latch with a count. More... | |
A countdown latch that will signal when the counter reaches zero.
| - (int) count |
Gets the current count on the latch.
| - (void) decrement |
Decrements the counter by one and signals if it reaches zero.
| - (NSString*) description |
Generates a string description of this instance.
| - (instancetype) init |
Creates a new instance of the latch with an unknown count.
This will cause the latch to count into the negatives until SetCount is called.
| - (instancetype) initWithInitialCount: | (int) | initialCount |
Creates a new instance of the latch with a count.
| initialCount | The initial counter value. |
| + (FMLiveSwitchManagedCountdownLatch*) managedCountdownLatch |
Creates a new instance of the latch with an unknown count.
This will cause the latch to count into the negatives until SetCount is called.
| + (FMLiveSwitchManagedCountdownLatch*) managedCountdownLatchWithInitialCount: | (int) | initialCount |
Creates a new instance of the latch with a count.
| initialCount | The initial counter value. |
| - (void) reset |
Resets the latch with an unknown count.
This will cause the latch to count into the negatives until SetCount is called.
| - (void) resetWithInitialCount: | (int) | initialCount |
Resets the latch with a count.
| initialCount | The initial counter value. |
| - (void) setCount: | (int) | count |
Sets the counter for the latch.
This brings the count back up into positive numbers.
| - (FMLiveSwitchFuture<id>*) waitAsync |
Returns a promise that resolves once the counter reaches zero.
| - (void) waitSync |
Blocks until the counter reaches zero.