Revision 1457,
718 bytes
checked in by bittner, 18 years ago
(diff) |
thread updates
|
Rev | Line | |
---|
[1146] | 1 | #include "BoostPreprocessorThread.h"
|
---|
| 2 | #include "Camera.h"
|
---|
| 3 | #include "KdTree.h"
|
---|
| 4 | #include "SceneGraph.h"
|
---|
| 5 | #include "Preprocessor.h"
|
---|
| 6 | #include <boost/thread/thread.hpp>
|
---|
| 7 |
|
---|
| 8 | namespace GtpVisibilityPreprocessor {
|
---|
| 9 |
|
---|
| 10 |
|
---|
| 11 | BoostPreprocessorThread::BoostPreprocessorThread(Preprocessor *p):
|
---|
| 12 | PreprocessorThread(p), mThread(NULL)
|
---|
| 13 | {
|
---|
| 14 | }
|
---|
| 15 |
|
---|
| 16 |
|
---|
| 17 | void BoostPreprocessorThread::operator()()
|
---|
| 18 | {
|
---|
| 19 | Main();
|
---|
| 20 | }
|
---|
| 21 |
|
---|
| 22 |
|
---|
| 23 |
|
---|
| 24 |
|
---|
| 25 | BoostPreprocessorThread::~BoostPreprocessorThread()
|
---|
| 26 | {
|
---|
[1199] | 27 | cerr << "Boost Preprocessor thread destructor ... \n";
|
---|
| 28 | DEL_PTR(mThread);
|
---|
[1146] | 29 | }
|
---|
| 30 |
|
---|
| 31 |
|
---|
| 32 | void BoostPreprocessorThread::InitThread()
|
---|
| 33 | {
|
---|
[1199] | 34 | mThread = new boost::thread(*this);
|
---|
[1146] | 35 | }
|
---|
| 36 |
|
---|
| 37 |
|
---|
| 38 | void BoostPreprocessorThread::RunThread()
|
---|
| 39 | {
|
---|
[1404] | 40 | Main();
|
---|
| 41 | //mThread->join();
|
---|
[1146] | 42 | }
|
---|
[1199] | 43 |
|
---|
[1146] | 44 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.