ttg
1.0.0
Template Task Graph (TTG): flowgraph-based programming model for high-performance distributed-memory algorithms
Loading...
Searching...
No Matches
ttg
ttg
util
future.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSD-3-Clause
2
//
3
// Created by Eduard Valeyev on 7/10/18.
4
//
5
6
#ifndef TTG_FUTURE_H
7
#define TTG_FUTURE_H
8
9
#include <future>
10
11
namespace
ttg
{
12
13
template
<
typename
T>
14
bool
has_value
(std::future<T>
const
& f)
15
{
return
f.wait_for(std::chrono::seconds(0)) == std::future_status::ready; }
16
17
template
<
typename
T>
18
bool
has_value
(std::shared_future<T>
const
& f)
19
{
return
f.wait_for(std::chrono::seconds(0)) == std::future_status::ready; }
20
21
}
22
23
#endif
//TTG_FUTURE_H
ttg
top-level TTG namespace contains runtime-neutral functionality
Definition
keymap.h:9
ttg::has_value
bool has_value(std::future< T > const &f)
Definition
future.h:14
Generated at Mon Nov 24 2025 13:41:21 for
ttg
1.0.0 by
1.9.8