Function hexchat_api::main_thread

source ·
pub fn main_thread<F, R>(callback: F) -> AsyncResult<R>where
    F: FnMut(&Hexchat) -> R + Sync + Send + 'static,
    R: 'static + Clone + Send,
Expand description

Executes a closure from the Hexchat main thread. This function returns immediately with an AsyncResult object that can be used to retrieve the result of the operation that will run on the main thread.

Arguments

  • callback - The callback to execute on the main thread.