Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
f8bb790f
Commit
f8bb790f
authored
Apr 20, 2010
by
Sebastian Eichelbaum
Browse files
[CHANGE] - remove obsolete m_FinishRequested flag from WThreadedRunner
parent
101f07de
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
5 additions
and
13 deletions
+5
-13
src/common/WLogger.cpp
src/common/WLogger.cpp
+2
-2
src/common/WThreadedRunner.cpp
src/common/WThreadedRunner.cpp
+0
-2
src/common/WThreadedRunner.h
src/common/WThreadedRunner.h
+0
-5
src/common/test/WThreadedRunner_test.h
src/common/test/WThreadedRunner_test.h
+2
-2
src/kernel/test/WModuleConnector_test.h
src/kernel/test/WModuleConnector_test.h
+1
-1
src/modules/eegView/WMEEGView.cpp
src/modules/eegView/WMEEGView.cpp
+0
-1
No files found.
src/common/WLogger.cpp
View file @
f8bb790f
...
...
@@ -94,7 +94,7 @@ void WLogger::setLogFileName( std::string fileName )
void
WLogger
::
addLogMessage
(
std
::
string
message
,
std
::
string
source
,
LogLevel
level
)
{
if
(
m_LogLevel
>
level
||
m_
FinishRequested
)
if
(
m_LogLevel
>
level
||
m_
shutdownFlag
()
)
{
return
;
}
...
...
@@ -158,7 +158,7 @@ void WLogger::threadMain()
// NOTE: in DEBUG mode, we do not use the process queue, since it prints messages delayed and is, therefore, not very usable during debugging.
#ifndef DEBUG
// Since the modules run in a separate thread: such loops are possible
while
(
!
m_
FinishRequested
)
while
(
!
m_
shutdownFlag
()
)
{
processQueue
();
// do fancy stuff
...
...
src/common/WThreadedRunner.cpp
View file @
f8bb790f
...
...
@@ -33,7 +33,6 @@ WThreadedRunner::WThreadedRunner():
m_shutdownFlag
(
new
WConditionOneShot
,
false
)
{
// initialize members
m_FinishRequested
=
false
;
}
WThreadedRunner
::~
WThreadedRunner
()
...
...
@@ -69,7 +68,6 @@ void WThreadedRunner::requestStop()
notifyStop
();
// then signal it
m_FinishRequested
=
true
;
m_shutdownFlag
(
true
);
}
...
...
src/common/WThreadedRunner.h
View file @
f8bb790f
...
...
@@ -98,11 +98,6 @@ protected:
*/
boost
::
thread
m_thread
;
/**
* True if thread should end execution. NOTE: do not use this. Use m_shutdownFlag instead.
*/
bool
m_FinishRequested
;
/**
* Give remaining execution timeslice to another thread.
*/
...
...
src/common/test/WThreadedRunner_test.h
View file @
f8bb790f
...
...
@@ -31,7 +31,7 @@
#include "../WThreadedRunner.h"
/**
/**
* Class implementing a simple worker thread, since proper testing of WThreadedRunner itself is not usable.
*/
class
WThreadedRunnerImpl
:
public
WThreadedRunner
...
...
@@ -45,7 +45,7 @@ protected:
virtual
void
threadMain
()
{
// Since the modules run in a separate thread: such loops are possible
while
(
!
m_
FinishRequested
)
while
(
!
m_
shutdownFlag
()
)
{
// do fancy stuff
sleep
(
1
);
...
...
src/kernel/test/WModuleConnector_test.h
View file @
f8bb790f
...
...
@@ -276,7 +276,7 @@ protected:
virtual
void
moduleMain
()
{
// Since the modules run in a separate thread: such loops are possible
while
(
!
m_
FinishRequested
)
while
(
!
m_
shutdownFlag
()
)
{
// do fancy stuff
sleep
(
1
);
...
...
src/modules/eegView/WMEEGView.cpp
View file @
f8bb790f
...
...
@@ -319,7 +319,6 @@ void WMEEGView::moduleMain()
if
(
!
openCustomWidget
()
)
{
// Shut down module if widget could not be opened.
m_FinishRequested
=
true
;
m_shutdownFlag
.
set
(
true
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment