Namespace

Dex – 1

A GNOME library for deferred execution

Version0.6.1
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 fileslibdex-1

Dependencies

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

Additional documentation

Classes

AsyncPair

unstable since: 1

AsyncResult

DexAsyncResult is used to integrate a DexFuture with GAsyncResult.

unstable since: 1

Block

DexBlock represents a callback closure that can be scheduled to run within a specific GMainContext.

unstable since: 1

Cancellable

DexCancellable is a simple cancellation primitive which allows for you to create DexFuture that will reject upon cancellation.

unstable since: 1

Channel

unstable since: 1

Delayed

DexDelayed is a future which will resolve or reject the value of another DexFuture when dex_delayed_release() is called.

unstable since: 1

Fiber

DexFiber is a fiber (or coroutine) which itself is a DexFuture.

unstable since: 1

Future

DexFuture is the base class representing a future which may resolve with a value or reject with error at some point in the future.

unstable since: 1

FutureSet

DexFutureSet represents a set of DexFuture.

unstable since: 1

MainScheduler

DexMainScheduler is the scheduler used on the default thread of an application. It is meant to integrate with your main loop.

unstable since: 1

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.

unstable since: 1

Promise

DexPromise is a convenient DexFuture for prpoagating a result or rejection in appliction and library code.

unstable since: 1

Scheduler

DexScheduler is the base class used by schedulers.

unstable since: 1

StaticFuture

DexStaticFuture represents a future that is resolved from the initial state.

unstable since: 1

ThreadPoolScheduler

DexThreadPoolScheduler is a DexScheduler that will dispatch work items and fibers to sub-schedulers on a specific operating system thread.

unstable since: 1

Timeout

DexTimeout is a DexFuture that will resolve after the configured period of time.

unstable since: 1

UnixSignal

DexUnixSignal is a DexFuture that will resolve when a specific unix signal has been received.

unstable since: 1

Structs

AioContext

unstable since: 1

AsyncPairInfo

unstable since: 1

Enumerations

BlockKind

unstable since: 1

FutureStatus

unstable since: 1

Error Domains

Error

unstable since: 1

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.

unstable since: 1

FutureCallback

A DexFutureCallback can be executed from a DexBlock as response to another DexFuture resolving or rejecting.

unstable since: 1

SchedulerFunc

unstable since: 1

Functions

aio_read

An asynchronous pread() wrapper.

unstable since: 1

aio_write

An asynchronous pwrite() wrapper.

unstable since: 1

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

unstable since: 1

file_copy

Asynchronously copies a file and returns a DexFuture which can be observed for the result.

unstable since: 1

file_enumerate_children

unstable since: 1

file_enumerator_next_files

unstable since: 1

file_load_contents_bytes

unstable since: 1

file_make_directory

Asynchronously creates a directory and returns DexFuture which can be observed for the result.

unstable since: 1

file_query_exists

Queries to see if file exists asynchronously.

since: 0.6

file_query_info

unstable since: 1

file_read

Asynchronously opens a file for reading.

unstable since: 1

file_replace

unstable since: 1

get_min_stack_size

unstable since: 1

get_page_size

unstable since: 1

init

unstable since: 1

input_stream_close

unstable since: 1

input_stream_read

unstable since: 1

input_stream_read_bytes

unstable since: 1

input_stream_skip

unstable since: 1

io_stream_close

unstable since: 1

output_stream_close

unstable since: 1

output_stream_splice

unstable since: 1

output_stream_write

unstable since: 1

output_stream_write_bytes

unstable since: 1

resolver_lookup_by_name

unstable since: 1

socket_client_connect

unstable since: 1

socket_listener_accept

unstable since: 1

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

unstable since: 1

ASYNC_PAIR_INFO_BOXED

unstable since: 1

ASYNC_PAIR_INFO_INT

unstable since: 1

ASYNC_PAIR_INFO_INT64

unstable since: 1

ASYNC_PAIR_INFO_LONG

unstable since: 1

ASYNC_PAIR_INFO_OBJECT

unstable since: 1

ASYNC_PAIR_INFO_POINTER

unstable since: 1

ASYNC_PAIR_INFO_STRING

unstable since: 1

ASYNC_PAIR_INFO_UINT

unstable since: 1

ASYNC_PAIR_INFO_UINT64

unstable since: 1

ASYNC_PAIR_INFO_ULONG

unstable since: 1

DEPRECATED_FOR

unstable since: 1

DEPRECATED_IN_1_0_FOR

unstable since: 1

OBJECT_TYPE

unstable since: 1

OBJECT_TYPE_NAME

unstable since: 1

UNAVAILABLE

unstable since: 1