Skip to main content

post

Function post 

Source
pub fn post<F>(job: F)
where F: FnOnce() + Send + 'static,
Expand description

Queues job to run on the main thread at the next tick.

Callable from any thread. The job runs once, in the order it was posted.

A panic inside the job is caught and logged: it must not unwind into the server’s C++ frames, which would abort the process.