TibrvFtMemberOnComplete::onComplete

Method

Declaration

virtual void onComplete(
    TibrvFtMember* ftMember) = 0;

Purpose

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

Parameter

Description

ftMember

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 method runs, the member is already destroyed; this method cannot use the member object in Rendezvous calls.

Remarks

This type of method is important in two situations:

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

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

TibrvFtMember::destroy() accepts a completion argument of type TibrvFtMemberOnComplete. Rendezvous software ensures that the completion method runs when the last callback-in-progress has completed.

Timing and Context

This information in completely analogous to TibrvEventOnComplete::onComplete(). See that section for important details.

See Also

TibrvFtMember::create()