TSDuck v3.46-4930
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
Multi-threading

Multi-threading and synchronization features. More...

Collaboration diagram for Multi-threading:

Classes

class  ts::MessagePriorityQueue< MSG, COMPARE >
class  ts::MessageQueue< MSG >
class  ts::null_mutex
class  ts::Thread
class  ts::ThreadAttributes
struct  ts::ThreadSafetyMutex< THS >
class  ts::WatchDog
class  ts::WatchDogHandlerInterface

Macros

#define TS_STATIC_VARIABLE(class_name, function_name)

Enumerations

enum class  ts::ThreadSafety {
  ts::ThreadSafety::Full ,
  ts::ThreadSafety::None
}

Detailed Description

Multi-threading and synchronization features.

Macro Definition Documentation

◆ TS_STATIC_VARIABLE

#define TS_STATIC_VARIABLE ( class_name,
function_name )

Define a static variable inside a translation unit. When a static variable in a source file are invoked in the initializaiton phase, it is not possible to rely on the fact that the object is already initialized. This macro solves this problem using an encapsulation of the object inside a private function of the module.

Parameters
class_nameFully qualified name of the object class.
function_nameName of the instance function which returns the object.

Enumeration Type Documentation

◆ ThreadSafety

enum class ts::ThreadSafety
strong

Thread safety property of a class.

Enumerator
Full 

Thread safe, can be used from multiple threads.

None 

No thread safety, use in one single thread or use explicit synchronization.