Reduct  v4.0.5-1-g4851deb
A functional and immutable language.
Loading...
Searching...
No Matches
future.h File Reference

Future primitives. More...

#include <reduct/defs.h>
#include <reduct/task.h>
#include <stdatomic.h>
#include <stdbool.h>
#include <threads.h>
Include dependency graph for future.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  reduct_future_t
 Future structure. More...
 

Macros

#define REDUCT_FUTURE_SMALL_MAX   2
 The maximum number of small arguments in a future.
 

Functions

REDUCT_API reduct_future_treduct_future_new (struct reduct *reduct, reduct_handle_t callable, size_t argc, reduct_handle_t *argv)
 Create a new future and start its execution.
 
static REDUCT_ALWAYS_INLINE reduct_handle_t reduct_future_join (struct reduct *reduct, reduct_future_t *future)
 Wait for the future to complete and return its result.
 
static REDUCT_ALWAYS_INLINE bool reduct_future_is_done (struct reduct *reduct, reduct_future_t *future)
 Check if the future is finished.
 

Detailed Description

Future primitives.

Definition in file future.h.