Open topic with navigation

TIBCO Rendezvous® 8.7.0

# tibrvftMonitorOnComplete

Function Type

## Declaration

    typedef void (*tibrvftMonitorOnComplete) (
        tibrvftMember  destroyedMonitor,
        void*          closure);

## Purpose

A program can destroy a monitor 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
`destroyedMonitor` | This parameter receives the monitor event object. This object is identical to the object that the program created to monitor the fault tolerance group. However, by the time this function runs, the monitor is already destroyed; this function cannot use the monitor object in Rendezvous calls.
`closure` | This parameter receives the closure data, which the program supplied in the call that created the monitor 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 monitor’s event queue), and the program must do additional processing after these callback functions have completed in all threads.

| • | A monitor callback function calls `tibrvftMonitor_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 `tibrvftMonitor_DestroyEx()`, the destroyed monitor’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.

`tibrvftMonitor_DestroyEx()` accepts a completion function argument of type tibrvftMonitorOnComplete. 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

tibrvftMonitor_Create()

tibrvftMonitor_Destroy()

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO Rendezvous®

Copyright © 1997-2023. Cloud Software Group, Inc. All Rights Reserved.