pub unsafe extern "C" fn ucp_worker_wait(
worker: ucp_worker_h,
) -> ucs_status_tExpand description
@ingroup UCP_WAKEUP @brief Wait for an event of the worker.
This routine waits (blocking) until an event has happened, as part of the wake-up mechanism.
This function is guaranteed to return only if new communication events occur on the @a worker. Therefore one must drain all existing events before waiting on the file descriptor. This can be achieved by calling @ref ucp_worker_progress repeatedly until it returns 0.
There are two alternative ways to use the wakeup mechanism. The first is by polling on a per-worker file descriptor obtained from @ref ucp_worker_get_efd. The second is by using this function to perform an internal wait for the next event associated with the specified worker.
@note During the blocking call the wake-up mechanism relies on other means of notification and may not progress some of the requests as it would when calling @ref ucp_worker_progress (which is not invoked in that duration).
@note UCP @ref ucp_feature “features” have to be triggered with @ref UCP_FEATURE_WAKEUP to select proper transport
@param [in] worker Worker to wait for events on.
@return Error code as defined by @ref ucs_status_t