Skip to main content

fdf_handle_close

Function fdf_handle_close 

Source
pub unsafe extern "C" fn fdf_handle_close(handle: fdf_handle_t)
Expand description

Closes a handle, causing the underlying object to be reclaimed by the runtime if no other handles to it exist.

If there is a pending callback registered (such as via |fdf_channel_wait_async|), it must be cancelled before this is called. For unsynchronized dispatchers, cancellation is not considered complete until the callback is invoked.

It is not an error to close the special “never a valid handle” |FDF_HANDLE_INVALID|, similar to free(NULL) being a valid call.

Closing the last handle to a peered object using |fdf_handle_close| can affect the state of the object’s peer (if any).

This operation is thread-safe.