tibrvftMemberOnComplete

Function Type

Declaration

typedef void (*tibrvftMemberOnComplete) (
    tibrvftMember  destroyedMember,
    void*          closure);

Purpose

A program can destroy a member object even when its callback function is running in one or more threads. Multi-threaded programs can define functions of this type to discover when all callback functions in progress have completed.

Parameter

Description

destroyedMember

This parameter receives the member event object. This object is identical to the object that the program created to join the fault tolerance group.

However, by the time this function runs, the member is already destroyed; this function cannot use the member object in Rendezvous calls.

closure

This parameter receives the closure data, which the program supplied in the call that created the member object.

Remarks

This type of function is important in two situations:

Internal fault tolerance callback functions run in several threads (because several threads dispatch the member’s event queue), and the program must do additional processing after these callback functions have completed in all threads.
A member callback function calls tibrvftMember_DestroyEx() to withdraw from a fault tolerance group, and the program must do additional processing after the rest of the callback function has completed.

Upon return from tibrvftMember_DestroyEx(), the destroyed member’s callback function can no longer begin to run (this is also true of internal callback functions). However, in each thread where a callback function is already in progress, that callback function does continue to run until complete.

tibrvftMember_DestroyEx() accepts a completion function argument of type tibrvftMemberOnComplete. Rendezvous software ensures that the completion function runs when the last callback-in-progress has completed.

Timing and Context

This information in completely analogous to tibrvEventOnComplete. See that section for important details.

See Also

tibrvftMember_Create()

tibrvftMember_DestroyEx(), see tibrvftMember_Destroy()