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
EventQueueto handle all responses for a given request or requests synchronously. TheEventQueuewill only deliver responses to the request(s) it is associated with.- __init__()
Construct an empty
EventQueuewhich can be passed tosendRequest()andsendAuthorizationRequest()methods.
- destroy()
Destroy the handle using stored dtor
- nextEvent(timeout=0)
- Parameters
timeout (int) – Timeout threshold in milliseconds.
- Returns
The next
Eventavailable from theEventQueue.- Return type
If the specified
timeoutis zero this method will wait forever for the next event. If the specifiedtimeoutis non zero then if noEventis available within the specifiedtimeoutanEventwith type ofTIMEOUTwill be returned.
- purge()
Purge any
Eventobjects in thisEventQueue.Purges any
Eventobjects in thisEventQueuewhich have not been processed and cancel any pending requests linked to thisEventQueue. TheEventQueuecan subsequently be re-used for a subsequent request.
- tryNextEvent()
- Returns
If the
EventQueueis non-empty, the nextEventavailable, otherwiseNone.- Return type