Destroys a channel.
BPS_API int bps_channel_destroy(int chid)
- The channel ID set by a call to the bps_channel_create() function.
After an application is finished using the channel, call the bps_channel_destroy() function for channels that are created using the bps_channel_create() function. After this function is called, all events that are waiting in the channel's event queue are completed and all callbacks registered with the bps_register_channel_destroy_handler() function are called.
When the chid parameter is the thread's active channel, it is destroyed and the default channel for the thread is set as the active channel.
BPS_SUCCESS when the function completes successfully, BPS_FAILURE with the errno value set otherwise.