TSDuck v3.46-4930
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
tsReactorSupport.h File Reference

Classes

class  ts::ReactorSupport

Namespaces

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

Macros

#define TS_USE_ASYNCHRONOUS_IO   1
#define TS_USE_IMMEDIATE_IO   1

Detailed Description

Define which kind of support is provided for reactors.

Macro Definition Documentation

◆ TS_USE_IMMEDIATE_IO

#define TS_USE_IMMEDIATE_IO   1

This macro is defined when the Reactor uses an immediate 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.

The macros TS_USE_IMMEDIATE_IO and TS_USE_ASYNCHRONOUS_IO should be used only when contitional compilation is required for syntactic reasons. A reactive I/O class should use "if constexpr" structures using the static methods UseImmediateIO() and UseAsynchronousIO().

See also
TS_USE_ASYNCHRONOUS_IO
ts::ReactorSupport::UseImmediateIO()
ts::ReactorSupport::UseAsynchronousIO()
ts::Device

◆ 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.

The macros TS_USE_IMMEDIATE_IO and TS_USE_ASYNCHRONOUS_IO should be used only when contitional compilation is required for syntactic reasons. A reactive I/O class should use "if constexpr" structures using the static methods UseImmediateIO() and UseAsynchronousIO().

See also
TS_USE_IMMEDIATE_IO
ts::ReactorSupport::UseImmediateIO()
ts::ReactorSupport::UseAsynchronousIO()
ts::Device