PrivMX DOCS
API Reference/PrivMX Endpoint/Core

EventQueue

EventQueue is a singleton class representing a queue for storing events.

Static Methods

getInstance

Gets the EventQueue instance.

static EventQueue getInstance()

Returns

[EventQueue](/reference/cpp/endpoint/core/event-queue) · EventQueue object

Methods

emitBreakEvent

Puts the break event on the events queue.

You can use it to break the waitEvent loop.

void emitBreakEvent()

waitEvent

Starts a loop waiting for an Event

EventHolder waitEvent()

Returns

[EventHolder](/reference/cpp/endpoint/core/event-holder) · EventHolder object

getEvent

Gets the first event from the events queue.

std::optional< EventHolder > getEvent()

Returns

std::optional<[EventHolder](/reference/cpp/endpoint/core/event-holder)> · EventHolder object (optional)

We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.