Namespace

Dex – 1

A GNOME library for deferred execution

Version0.4.0
AuthorsChristian Hergert
LicenseLGPL-2.1-or-later
Websitehttps://gitlab.gnome.org/GNOME/libdex/
Sourcehttps://gitlab.gnome.org/GNOME/libdex/

Build

C headerslibdex.h
pkg-config files

Dependencies

GObject The base type system library
Browse documentation
GLib The base type system library
Browse documentation
GIO GObject Interfaces and Objects, Networking, IPC, and I/O
Browse documentation

Additional documentation

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

Enumerations

Error Domains

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().

dbus_connection_call

Wrapper for g_dbus_connection_call().

dbus_connection_call_with_unix_fd_list

Wrapper for g_dbus_connection_call_with_unix_fd_list().

dbus_connection_send_message_with_reply

Wrapper for g_dbus_connection_send_message_with_reply().

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().

value_get_object

Retrieves the DexObject stored inside the given value.

value_set_object

Stores the given DexObject inside value.

value_take_object

Stores the given DexObject inside value.