Skip to content

Add optional extension of EventProcessor for asynchronous processing

Marco Clemencic requested to merge clemenci/Gaudi:async-main-loop into master

Added a new interface (Gaudi::Interfaces::IAsyncEventProcessor) to allow writing applications running event loops in threads independent from the main thread.

The key point is that instead of nextEvent(N) or executeEvent() one can call asyncExecuteEvent(), which returns a std:future carrying the final StatusCode of the event loop and the EventContext that was passed to the method.

The main thread would then be able to control when and how to enqueue new events (e.g. for asynchronous I/O from the network), and, at the same time, know which events have been processed.

For backward compatibility, the event processor required to work in async mode must be specifically adapted to the new interface.

Includes !838 (merged)

CC @frankm, @nnolte

Edited by Marco Clemencic

Merge request reports

Loading