Open topic with navigation

TIBCO Rendezvous® 8.8.0

# tibrvQueueHook

Function Type

## Declaration

    typedef void (*tibrvQueueHook) (
        tibrvQueue    eventQueue,
        void*         closure);

## Purpose

Asynchronously notify an external event manager when a Rendezvous event is ready for dispatch.

## Motivation

Some programs need to use existing event managers to dispatch Rendezvous events. Some event managers repeatedly poll queues for events; others require notification that an event is ready (for example, the Microsoft Windows event manager operates this way). This hook function can inform an event manager when an event enters a queue and is ready for dispatch.

You can think of this function as a wake-up call to the event manager. Once awakened, the event manager dispatches Rendezvous events in its usual way, by calling tibrvQueue_Dispatch() or tibrvQueue_TimedDispatch().

## Remarks

When coding hook functions, remember that hook functions can be called from any thread. In general, hook functions run in the thread that enqueues the event; that thread can be a program thread, or a Rendezvous internal thread.

## Procedure

To use this facility, follow these steps:

Procedure

| 1. | Code a queue hook function to post a message to the target event manager when a message is received.

| 2. | Arrange for the target event handler to call tibrvQueue_Dispatch().

| 3. | Register the queue hook function, using tibrvQueue_SetHook().

Parameter | Description
`eventQueue` | This parameter receives the queue on which an event has arrived.
`closure` | This parameter receives closure data supplied by the program when it registered this hook function.

## See Also

tibrvQueue_Dispatch()

tibrvQueue_GetHook()

tibrvQueue_RemoveHook()

tibrvQueue_SetHook()

tibrvQueue_TimedDispatch()

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-2025. Cloud Software Group, Inc. All Rights Reserved.