Flutter Engine
The Flutter Engine
fml
synchronization
count_down_latch.cc
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#include "flutter/fml/synchronization/count_down_latch.h"
6
7
#include "flutter/fml/logging.h"
8
9
namespace
fml
{
10
11
CountDownLatch::CountDownLatch
(
size_t
count
) : count_(
count
) {
12
if
(count_ == 0) {
13
waitable_event_.
Signal
();
14
}
15
}
16
17
CountDownLatch::~CountDownLatch
() =
default
;
18
19
void
CountDownLatch::Wait
() {
20
waitable_event_.
Wait
();
21
}
22
23
void
CountDownLatch::CountDown
() {
24
if
(--count_ == 0) {
25
waitable_event_.
Signal
();
26
}
27
}
28
29
}
// namespace fml
count
int count
Definition:
FontMgrTest.cpp:50
fml::CountDownLatch::~CountDownLatch
~CountDownLatch()
fml::CountDownLatch::CountDownLatch
CountDownLatch(size_t count)
Definition:
count_down_latch.cc:11
fml::CountDownLatch::Wait
void Wait()
Definition:
count_down_latch.cc:19
fml::CountDownLatch::CountDown
void CountDown()
Definition:
count_down_latch.cc:23
fml::ManualResetWaitableEvent::Signal
void Signal()
Definition:
waitable_event.cc:127
fml::ManualResetWaitableEvent::Wait
void Wait()
Definition:
waitable_event.cc:139
fml
Definition:
ascii_trie.cc:9
Generated on Sun Jun 23 2024 21:54:58 for Flutter Engine by
1.9.4