Timeout wait in dispatch()

Options
mktdata
mktdata Contributor
edited July 14 in RFA

Hi team,

We are using the RFA 8.2 C++ API along with Dacs 7.8.
When dispatching events from the EventQueue, we use the following method:

eventQueue->dispatch(16);

If we modify the timeout from 16 milliseconds to 1 millisecond, will this impact the latency of event processing? Additionally, what is the recommended standard value for this timeout?

Thanks!

Answers

  • Hello @mktdata

    The time parameter to the dispatch() function is how long the thread will be blocked while waiting for an event to arrive. The value will depend on your application design choice.

    If you have a multithreaded app where events are being dispatched on a dedicated thread, then you can use INFINITE_WAIT to keep this thread blocked until there is an event.

    Please see the RFA SDK developers guide for more information on the function call. Changing from 16 to 1 might increase the latency of event processing, depending on task load on the event dispatch thread.

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @mktdata

    You can also refer to the Chapter 17 Performance Considerations in the RFA Developers guide.