Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
fml::CountDownLatch Class Reference

#include <count_down_latch.h>

Public Member Functions

 CountDownLatch (size_t count)
 
 ~CountDownLatch ()
 
void Wait ()
 
void CountDown ()
 

Detailed Description

Definition at line 15 of file count_down_latch.h.

Constructor & Destructor Documentation

◆ CountDownLatch()

fml::CountDownLatch::CountDownLatch ( size_t  count)
explicit

Definition at line 11 of file count_down_latch.cc.

11 : count_(count) {
12 if (count_ == 0) {
13 waitable_event_.Signal();
14 }
15}
int count
Definition: FontMgrTest.cpp:50

◆ ~CountDownLatch()

fml::CountDownLatch::~CountDownLatch ( )
default

Member Function Documentation

◆ CountDown()

void fml::CountDownLatch::CountDown ( )

Definition at line 23 of file count_down_latch.cc.

23 {
24 if (--count_ == 0) {
25 waitable_event_.Signal();
26 }
27}

◆ Wait()

void fml::CountDownLatch::Wait ( )

Definition at line 19 of file count_down_latch.cc.

19 {
20 waitable_event_.Wait();
21}

The documentation for this class was generated from the following files: