hexchat_api

Function 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.