Skip to main content

Module thread

Module thread 

Source
Expand description

Thread callback wrappers for the C API. Thread callback information and utilities for azul-layout

This module provides thread-related callback structures for background tasks that need to interact with the UI thread and query layout information.

Structs§

CreateThreadCallback
LibraryReceiveThreadMsgCallback
Thread
Wrapper around Thread because Thread needs to be clone-able
ThreadCallback
ThreadDestructorCallback
ThreadInner
A Thread is a separate thread that is owned by the framework.
ThreadSendCallback
ThreadSender
ThreadSender allows sending messages from the background thread to the main thread
ThreadSenderDestructorCallback
ThreadSenderInner
Inner state of a ThreadSender, holding the channel sender and associated callbacks
ThreadWriteBackMsg
Message containing writeback data and callback
WriteBackCallback
Callback that can run when a thread receives a WriteBack message

Enums§

OptionThread
Optional Thread type for API compatibility
OptionThreadReceiveMsg
ThreadReceiveMsg
Message that is sent back from the running thread to the main thread

Statics§

THREAD_CALLBACK_INVOKER
Process-global slot for this callback kind’s host-side invoker.

Functions§

AzApp_setThreadCallbackInvoker
Register the host-side invoker for this callback kind.
AzThreadCallback_createFromHostHandle
C-ABI export wrapping <Wrapper>::create_from_host_handle.
create_thread_libstd
Create a new thread using the standard library
thread_sleep_ms
Sleeps the current thread for the specified number of milliseconds.
thread_sleep_ns
Sleeps the current thread for the specified number of nanoseconds.
thread_sleep_us
Sleeps the current thread for the specified number of microseconds.

Type Aliases§

AzThreadCallbackInvoker
Pointer-arg variant of this callback kind’s typedef.
CreateThreadCallbackType
Function that creates a new Thread object
LibraryReceiveThreadMsgCallbackType
Callback type for receiving messages from a background thread
ThreadCallbackType
Callback type for the function that runs in the background thread
ThreadDestructorCallbackType
Callback type for the destructor that cleans up a ThreadInner
ThreadSendCallbackType
Callback for sending messages from thread to main thread
ThreadSenderDestructorCallbackType
Destructor callback for ThreadSender
WriteBackCallbackType
Callback that runs when a thread receives a WriteBack message