Skip to main content

io_wrapper_set_app_context_and_dtor

Last updated March 2020

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.

Parameters

io

The io object.

context

A context value.

dtor

The function to call on destruction.

Return Value

This function returns void.

Threading

It is legal to call this function in any thread.

See Also

Was this page helpful?