Dex – 1
Description: Reference for Dex-1

### Namespace

# Dex – 1

A GNOME library for deferred execution

Version | 0.4.0
Authors | Christian Hergert
License | LGPL-2.1-or-later
Website | https://gitlab.gnome.org/GNOME/libdex/
Source | https://gitlab.gnome.org/GNOME/libdex/

#### Build

C headers | `libdex.h`
pkg-config files | ``

#### Dependencies

GLib—2.0 | The base type system library
| Browse documentation
GObject—2.0 | The base type system library
| Browse documentation

#### Additional documentation

- Overview
- Classes Hierarchy

#### Classes

AsyncPair |
AsyncResult |
Block |
Cancellable |
Channel |
Delayed |
Fiber |
Future |
FutureSet |
MainScheduler |
Object | `DexObject` is the basic building block of types defined within libdex. Futures, Schedulers, and Channels all inherit from DexObject which provides features like thread-safe weak pointers and memory management operations.
Promise |
Scheduler |
StaticFuture |
ThreadPoolScheduler |
Timeout |
UnixSignal |

#### Structs

AioContext |
AsyncPairInfo |

#### Enumerations

BlockKind |
FutureStatus |

#### Error Domains

Error |

#### Callbacks

FiberFunc | This function prototype is used for spawning fibers. A fiber is a lightweight, cooperative-multitasking feature where the fiber is given it’s own stack. The fiber runs until it reaches a point of suspension (using `dex_await` or similar) or exits the fiber.
FutureCallback | A `DexFutureCallback` can be executed from a `DexBlock` as response to another `DexFuture` resolving or rejecting.
SchedulerFunc |

#### Functions

aio_read | An asynchronous `pread()` wrapper.
aio_write | An asynchronous `pwrite()` wrapper.
bus_get | Wrapper for g_bus_get(). since: 0.4
dbus_connection_call | Wrapper for g_dbus_connection_call(). since: 0.4
dbus_connection_call_with_unix_fd_list | Wrapper for g_dbus_connection_call_with_unix_fd_list(). since: 0.4
dbus_connection_send_message_with_reply | Wrapper for g_dbus_connection_send_message_with_reply(). since: 0.4
error_quark |
file_copy | Asynchronously copies a file and returns a `DexFuture` which can be observed for the result.
file_enumerate_children |
file_enumerator_next_files |
file_load_contents_bytes |
file_make_directory | Asynchronously creates a directory and returns `DexFuture` which can be observed for the result.
file_query_info |
file_read | Asynchronously opens a file for reading.
file_replace |
get_min_stack_size |
get_page_size |
init |
input_stream_close |
input_stream_read |
input_stream_read_bytes |
input_stream_skip |
io_stream_close |
output_stream_close |
output_stream_splice |
output_stream_write |
output_stream_write_bytes |
resolver_lookup_by_name |
socket_client_connect |
socket_listener_accept |
subprocess_wait_check | Creates a future that awaits for `subprocess` to complete using g_subprocess_wait_check_async(). since: 0.4
value_get_object | Retrieves the `DexObject` stored inside the given `value`. since: 0.4
value_set_object | Stores the given `DexObject` inside `value`. since: 0.4
value_take_object | Stores the given `DexObject` inside `value`. since: 0.4

#### Function Macros

ASYNC_PAIR_INFO_BOOLEAN |
ASYNC_PAIR_INFO_BOXED |
ASYNC_PAIR_INFO_INT |
ASYNC_PAIR_INFO_INT64 |
ASYNC_PAIR_INFO_LONG |
ASYNC_PAIR_INFO_OBJECT |
ASYNC_PAIR_INFO_POINTER |
ASYNC_PAIR_INFO_STRING |
ASYNC_PAIR_INFO_UINT |
ASYNC_PAIR_INFO_UINT64 |
ASYNC_PAIR_INFO_ULONG |
DEPRECATED_FOR |
DEPRECATED_IN_1_0_FOR |
OBJECT_TYPE |
OBJECT_TYPE_NAME |
UNAVAILABLE |