TSDuck v3.44-4659
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
tsReactor.h File Reference

Event-driven reactor class implementing the "event loop" pattern. More...

Classes

class  ts::Reactor
 Event-driven reactor class implementing the "event loop" pattern. More...
 

Namespaces

namespace  ts
 TSDuck namespace, containing all TSDuck classes and functions.
 

Macros

#define TS_USE_ASYNCHRONOUS_IO   1
 This macro is defined when the Reactor uses an asynchronous I/O model.
 
#define TS_USE_NON_BLOCKING_IO   1
 This macro is defined when the Reactor uses a non-blocking I/O model.
 

Detailed Description

Event-driven reactor class implementing the "event loop" pattern.

Macro Definition Documentation

◆ TS_USE_NON_BLOCKING_IO

#define TS_USE_NON_BLOCKING_IO   1

This macro is defined when the Reactor uses a non-blocking I/O model.

Reactive classes which manage I/O shall repeatedly attempt I/O operations as long as they succeed. When they fail with a "would block" status, the reactive class shall request the Reactor to be notified when the I/O becomes possible.

◆ TS_USE_ASYNCHRONOUS_IO

#define TS_USE_ASYNCHRONOUS_IO   1

This macro is defined when the Reactor uses an asynchronous I/O model.

Reactive classes which manage I/O shall start I/O operations and, if the operation completes with a "pending" status, the reactive class shall request the Reactor to be notified when the I/O completes. In the meantime, the reactive class shall ensure that the I/O buffers remain valid, as they are used in the background by the I/O.