A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
completion_signal.h
Go to the documentation of this file.
1// Copyright 2026 The A11 Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef A11_WASM_COMPLETION_SIGNAL_H_
16#define A11_WASM_COMPLETION_SIGNAL_H_
17
19
20namespace a11::wasm {
21
23 public:
24 void Complete();
25 void Wait();
26
27 private:
28 thread::Mutex mu_;
29 thread::CondVar cv_;
30 bool done_ ABSL_GUARDED_BY(mu_) = false;
31};
32
33} // namespace a11::wasm
34
35extern "C" void a11_wasm_completion_notify(
36 a11::wasm::CompletionSignal* completion);
37
38#endif // A11_WASM_COMPLETION_SIGNAL_H_
Definition completion_signal.h:22
void Wait()
Definition completion_signal.cc:25
void Complete()
Definition completion_signal.cc:19
Definition boost_primitives.h:21
void a11_wasm_completion_notify(a11::wasm::CompletionSignal *completion)
Definition completion_signal.cc:34
Definition async_task.cc:27