Flutter Engine
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)

Definition at line 11 of file count_down_latch.cc.

References fml::ManualResetWaitableEvent::Signal(), and ~CountDownLatch().

11  : count_(count) {
12  if (count_ == 0) {
13  waitable_event_.Signal();
14  }
15 }

◆ ~CountDownLatch()

fml::CountDownLatch::~CountDownLatch ( )
default

Referenced by CountDownLatch().

Member Function Documentation

◆ CountDown()

void fml::CountDownLatch::CountDown ( )

Definition at line 23 of file count_down_latch.cc.

References fml::ManualResetWaitableEvent::Signal().

Referenced by fml::benchmarking::BM_RegisterAndGetTasks(), fml::TEST(), fml::testing::TEST(), TEST(), and flutter::testing::TEST_F().

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

◆ Wait()

void fml::CountDownLatch::Wait ( )

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