pub unsafe extern "C" fn pomp_loop_idle_add(
loop_: *mut pomp_loop,
cb: pomp_idle_cb_t,
userdata: *mut c_void,
) -> c_intExpand description
Register a function to be called when loop is idle, i.e. there is no event to be processed. The registered function will be called only once and in the order they are registered. @param loop : loop. @param cb : callback to call. @param userdata : user data for callback. @return 0 in case of success, negative errno value in case of error.
@remarks: this function is useful to register cleanup functions when called by an fd event callback for example. @remarks: this function is safe to call from another thread that the one associated normally with the loop. However caller must ensure that the given loop will be valid for the complete duration of the call.