Classes Files

Wombat::MamaQueue::EnqueueEventForwarder

This class is used to forward messages from the enqueueEvent function to the instance of the MamaQueueCallback class that the client originally supplied. Note that multiple events may be enqueued before any of them are processed. To avoid the managed objects being collected references are stored in a Dictionary object. These are then removed whenever the relevant callback fires.

Public Functions

  Name
delegate void EnqueueCallback(IntPtr queue, IntPtr closure)
This delegate is passed to the underlying C layer to act as the callback to mamaQueue_enqueueEvent.
  EnqueueEventForwarder(MamaQueueEventCallback callback, object closure, MamaQueue sender)
Constructor initialises all member variables.
int ForwardEvent(MamaQueueEventCallback callback, object closure, IntPtr nativeHandle, MamaQueue sender)

Public Properties

  Name
EnqueueCallback NativeCallback
Read only property returns the native callback delegate.

Public Functions Documentation

function EnqueueCallback

delegate void EnqueueCallback(
    IntPtr queue,
    IntPtr closure
)

This delegate is passed to the underlying C layer to act as the callback to mamaQueue_enqueueEvent.

Parameters:

  • queue The queue.
  • closure Utility object passed to mamaQueue_enqueueEvent.

function EnqueueEventForwarder

EnqueueEventForwarder(
    MamaQueueEventCallback callback,
    object closure,
    MamaQueue sender
)

Constructor initialises all member variables.

Parameters:

  • callback The callback object that will be invoked whenever an event is processed.
  • closure Utility object.
  • sender The queue.

function ForwardEvent

static int ForwardEvent(
    MamaQueueEventCallback callback,
    object closure,
    IntPtr nativeHandle,
    MamaQueue sender
)

Public Property Documentation

property NativeCallback

EnqueueCallback NativeCallback;

Read only property returns the native callback delegate.


Updated on 2023-03-31 at 15:29:32 +0100