Flutter Engine
The Flutter Engine
fml
synchronization
count_down_latch.h
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
#ifndef FLUTTER_FML_SYNCHRONIZATION_COUNT_DOWN_LATCH_H_
6
#define FLUTTER_FML_SYNCHRONIZATION_COUNT_DOWN_LATCH_H_
7
8
#include <atomic>
9
10
#include "flutter/fml/macros.h"
11
#include "flutter/fml/synchronization/waitable_event.h"
12
13
namespace
fml
{
14
15
class
CountDownLatch
{
16
public
:
17
explicit
CountDownLatch
(
size_t
count
);
18
19
~CountDownLatch
();
20
21
void
Wait
();
22
23
void
CountDown
();
24
25
private
:
26
std::atomic_size_t count_;
27
ManualResetWaitableEvent
waitable_event_;
28
29
FML_DISALLOW_COPY_AND_ASSIGN(
CountDownLatch
);
30
};
31
32
}
// namespace fml
33
34
#endif
// FLUTTER_FML_SYNCHRONIZATION_COUNT_DOWN_LATCH_H_
count
int count
Definition:
FontMgrTest.cpp:50
fml::CountDownLatch
Definition:
count_down_latch.h:15
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
Definition:
waitable_event.h:80
fml
Definition:
ascii_trie.cc:9
Generated on Sun Jun 23 2024 21:54:58 for Flutter Engine by
1.9.4