io_wrapper_set_app_context_and_dtor
Name
io_wrapper_set_app_context_and_dtor — Set an application-specific context value and destructor
Synopsis
#include "io_wrapper.h"
| void **io_wrapper_set_app_context_and_dtor** (
| io, | |
| | context, | |
| | on_destroy)
; | |
io_object * <var class="pdparam">io</var>
;
void * <var class="pdparam">context</var>
;
void(*)(io_object *) <var class="pdparam">on_destroy</var>
;
Description
Set an application-specific context value and destructor.
An io_object can store one context value for "application use" (not an io wrapper implementation). The destructor will be called just prior to the final destruction of the IO object, allowing an application to take some action at that point.
- io
-
The io object.
- context
-
A context value.
- dtor
-
The function to call on destruction.
This function returns void.
It is legal to call this function in any thread.