kwave
18.07.70
Main Page
Related Pages
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
f
h
i
l
m
o
p
r
s
t
u
w
y
z
Functions
Typedefs
Enumerations
+
Enumerator
a
b
c
f
i
l
o
p
r
s
u
w
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
+
Variables
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
v
w
x
y
z
Typedefs
Enumerations
+
Enumerator
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Related Functions
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
i
l
m
p
q
r
s
t
x
z
Variables
Typedefs
+
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
WorkerThread.h
Go to the documentation of this file.
1
/***************************************************************************
2
libkwave/WorkerThread.h - worker thread for Kwave
3
-------------------
4
begin : Sun Apr 06 2008
5
copyright : (C) 2008 by Thomas Eschenbacher
6
email : Thomas.Eschenbacher@gmx.de
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef WORKER_THREAD_H
19
#define WORKER_THREAD_H
20
21
#include "config.h"
22
#include <pthread.h>
23
24
#include <QAtomicInt>
25
#include <QtGlobal>
26
#include <QMutex>
27
#include <QObject>
28
#include <QThread>
29
#include <QVariant>
30
31
namespace
Kwave
32
{
33
class
Runnable;
34
35
class
Q_DECL_EXPORT
WorkerThread
:
public
QThread
36
{
37
Q_OBJECT
38
public
:
39
41
explicit
WorkerThread
(
Kwave::Runnable
*runnable, QVariant params);
42
44
virtual
~
WorkerThread
() Q_DECL_OVERRIDE;
45
47
virtual
void
start();
48
56
virtual
int
stop(
unsigned
int
timeout = 10000);
57
62
virtual
void
run() Q_DECL_OVERRIDE;
63
68
virtual
void
cancel();
69
75
bool
shouldStop();
76
77
private
:
78
80
Kwave::Runnable
*
m_runnable
;
81
83
QVariant
m_params
;
84
86
QMutex
m_lock
;
87
89
QMutex
m_lock_sighup
;
90
92
QAtomicInt
m_should_stop
;
93
99
pthread_t
m_tid
;
100
102
pthread_t
m_owner_tid
;
103
104
};
105
106
}
107
108
#endif
/* WORKER_THREAD_H */
109
110
//***************************************************************************
111
//***************************************************************************
Kwave::WorkerThread::m_params
QVariant m_params
Definition:
WorkerThread.h:83
Kwave
Definition:
App.h:33
Kwave::WorkerThread::m_owner_tid
pthread_t m_owner_tid
Definition:
WorkerThread.h:102
Kwave::WorkerThread::m_lock_sighup
QMutex m_lock_sighup
Definition:
WorkerThread.h:89
Kwave::WorkerThread
Definition:
WorkerThread.h:35
Kwave::Runnable
Definition:
Runnable.h:25
Kwave::WorkerThread::m_lock
QMutex m_lock
Definition:
WorkerThread.h:86
Kwave::WorkerThread::m_should_stop
QAtomicInt m_should_stop
Definition:
WorkerThread.h:92
Kwave::WorkerThread::m_runnable
Kwave::Runnable * m_runnable
Definition:
WorkerThread.h:80
Kwave::WorkerThread::m_tid
pthread_t m_tid
Definition:
WorkerThread.h:99
libkwave
WorkerThread.h
Generated on Sat Mar 24 2018 09:10:26 for kwave by
1.8.13