dxFeed Graal CXX API
Loading...
Searching...
No Matches
Handler< Signature > Struct Template Reference

A thread-safe class that allows to asynchronously notify listeners with a given signature. More...

Detailed Description

template<typename Signature>
struct Handler< Signature >

A thread-safe class that allows to asynchronously notify listeners with a given signature.

Listeners can be any callable entities. Listeners are placed in a future. Within one batch, listeners will be called sequentially. Futures are placed in a circular buffer and executed asynchronously.

If you need synchronous execution of listeners, but it was possible to execute them in another thread, then limit the buffer size to one.

Template Parameters
SignatureThe arguments "signature" (example: void(int, int))