CountDownLatch


Object Hierarchy:

Object hierarchy for CountDownLatch

Description:

public class CountDownLatch : Object

Countdown latch for one-shot synchronization.

CountDownLatch starts with a fixed counter. Worker threads call countDown(), and waiting thread(s) block in await() until the counter reaches zero.

Example:

    var created = CountDownLatch.of (2);
if (created.isError ()) {
return;
}
var latch = created.unwrap ();
// Two workers call latch.countDown()
latch.@await ();


Namespace: Vala.Concurrent
Package: Valacore

Content:

Static methods:

Methods:

Inherited Members:

All known members inherited from class GLib.Object