blpapi.EventQueue

class blpapi.EventQueue

A construct used to handle replies to request synchronously.

When a request is submitted an application can either handle the responses asynchronously as they arrive or use an EventQueue to handle all responses for a given request or requests synchronously. The EventQueue will only deliver responses to the request(s) it is associated with.

__init__()

Construct an empty EventQueue which can be passed to sendRequest() and sendAuthorizationRequest() methods.

destroy()

Destructor.

nextEvent(timeout=0)
Parameters

timeout (int) – Timeout threshold in milliseconds.

Returns

The next Event available from the EventQueue.

Return type

Event

If the specified timeout is zero this method will wait forever for the next event. If the specified timeout is non zero then if no Event is available within the specified timeout an Event with type of TIMEOUT will be returned.

purge()

Purge any Event objects in this EventQueue.

Purges any Event objects in this EventQueue which have not been processed and cancel any pending requests linked to this EventQueue. The EventQueue can subsequently be re-used for a subsequent request.

tryNextEvent()
Returns

If the EventQueue is non-empty, the next Event available, otherwise None.

Return type

Event