MythTV  master
Public Member Functions | Private Attributes | List of all members
SystemEventThread Class Reference

QRunnable class for running MythSystemEvent handler commands. More...

Inheritance diagram for SystemEventThread:
Inheritance graph
[legend]
Collaboration diagram for SystemEventThread:
Collaboration graph
[legend]

Public Member Functions

 SystemEventThread (QString cmd, QString eventName="")
 Constructor for creating a SystemEventThread. More...
 
void run (void) override
 Runs the System Event handler command. More...
 

Private Attributes

QString m_command
 
QString m_event
 

Detailed Description

QRunnable class for running MythSystemEvent handler commands.

The SystemEventThread class runs a system event handler command in non-blocking mode. The commands are run in the MThreadPool::globalInstance, but we release and reserve the thread inside ::run() so that long-running commands to not block other short-running commands from executing if we hit MThreadPool::maxThreadCount().

Definition at line 28 of file mythsystemevent.cpp.

Constructor & Destructor Documentation

◆ SystemEventThread()

SystemEventThread::SystemEventThread ( QString  cmd,
QString  eventName = "" 
)
inlineexplicit

Constructor for creating a SystemEventThread.

Parameters
cmdCommand line to run for this System Event
eventNameOptional System Event name for this command

Definition at line 37 of file mythsystemevent.cpp.

Member Function Documentation

◆ run()

SystemEventThread::run ( void  )
inlineoverride

Runs the System Event handler command.

Overrides QRunnable::run()

Definition at line 45 of file mythsystemevent.cpp.

Member Data Documentation

◆ m_command

QString SystemEventThread::m_command
private

Definition at line 65 of file mythsystemevent.cpp.

Referenced by run().

◆ m_event

QString SystemEventThread::m_event
private

Definition at line 66 of file mythsystemevent.cpp.

Referenced by run().


The documentation for this class was generated from the following file: