stlab 2.3.0
Modern, modular C++ algorithms, data structures, and concurrency primitives
Loading...
Searching...
No Matches
libdispatch_executor_group.hpp
1/*
2 Copyright 2026 Adobe
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5*/
6
7/**************************************************************************************************/
8
9#ifndef STLAB_CONCURRENCY_DETAIL_LIBDISPATCH_EXECUTOR_GROUP_HPP
10#define STLAB_CONCURRENCY_DETAIL_LIBDISPATCH_EXECUTOR_GROUP_HPP
11
12#include <stlab/config.hpp>
13
14#include <dispatch/dispatch.h>
15
16#include <utility>
17
18namespace stlab {
19STLAB_VERSION_NAMESPACE_BEGIN()
20namespace detail {
21
23struct group_t {
24 dispatch_group_t _group = dispatch_group_create();
25
27 group_t() = default;
28
30 group_t(const group_t&) = delete;
31
33 group_t(group_t&& a) noexcept : _group(std::exchange(a._group, nullptr)) {}
34
36 auto operator=(const group_t&) -> group_t& = delete;
37
39 auto operator=(group_t&& a) noexcept -> group_t& {
40 _group = std::exchange(a._group, nullptr);
41 return *this;
42 }
43
45 ~group_t();
46};
47
49auto group() -> const group_t&;
50
51} // namespace detail
52STLAB_VERSION_NAMESPACE_END()
53} // namespace stlab
54
55/**************************************************************************************************/
56
57#endif
58
59/**************************************************************************************************/
Definition reverse.hpp:28