Function gnunet_sys::GNUNET_SCHEDULER_do_work[][src]

pub unsafe extern "C" fn GNUNET_SCHEDULER_do_work(
    sh: *mut GNUNET_SCHEDULER_Handle
) -> c_int

Function called by external event loop implementations to tell the scheduler to run some of the tasks that are ready. Must be called only after #GNUNET_SCHEDULER_driver_init has been called and before #GNUNET_SCHEDULER_driver_done is called. This function may return even though there are tasks left to run just to give other tasks a chance as well. If we return #GNUNET_YES, the event loop implementation should call this function again as soon as possible, while if we return #GNUNET_NO it must block until either the operating system has more work (the scheduler has no more work to do right now) or the timeout set by the scheduler (using the set_wakeup callback) is reached.

@param sh scheduler handle that was returned by #GNUNET_SCHEDULER_driver_init @return #GNUNET_YES if there are more tasks that are ready, and thus we would like to run more (yield to avoid blocking other activities for too long) #GNUNET_NO if we are done running tasks (yield to block)