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. TheEventQueue
will only deliver responses to the request(s) it is associated with.-
__init__
()¶ Construct an empty
EventQueue
which can be passed tosendRequest()
andsendAuthorizationRequest()
methods.
-
destroy
()¶ Destructor.
-
nextEvent
(timeout=0)¶ - Parameters
timeout (int) – Timeout threshold in milliseconds.
- Returns
The next
Event
available from theEventQueue
.- Return type
If the specified
timeout
is zero this method will wait forever for the next event. If the specifiedtimeout
is non zero then if noEvent
is available within the specifiedtimeout
anEvent
with type ofTIMEOUT
will be returned.
-
purge
()¶ Purge any
Event
objects in thisEventQueue
.Purges any
Event
objects in thisEventQueue
which have not been processed and cancel any pending requests linked to thisEventQueue
. TheEventQueue
can subsequently be re-used for a subsequent request.
-
tryNextEvent
()¶ - Returns
If the
EventQueue
is non-empty, the nextEvent
available, otherwiseNone
.- Return type
-