FairMQ/fairmq/run
Alexey Rybalchenko bd79420f93 Condition check before ending the main thread.
Make sure the main thread waits for the child thread with the Run() method.

* Add this at the end of your Run() method for each device:
```
boost::lock_guard<boost::mutex> lock(fRunningMutex);
fRunningFinished = true;
fRunningCondition.notify_one();
```
* Then you must replace the `char ch; cin.get(ch);` in your main() function with:
```
boost::unique_lock<boost::mutex> lock(processor.fRunningMutex);
while (!processor.fRunningFinished)
{
    processor.fRunningCondition.wait(lock);
}
```
2014-09-01 15:26:37 +02:00
..
runBenchmarkSampler.cxx Condition check before ending the main thread. 2014-09-01 15:26:37 +02:00
runBinSampler.cxx Condition check before ending the main thread. 2014-09-01 15:26:37 +02:00
runBinSink.cxx Condition check before ending the main thread. 2014-09-01 15:26:37 +02:00
runBuffer.cxx Condition check before ending the main thread. 2014-09-01 15:26:37 +02:00
runMerger.cxx Condition check before ending the main thread. 2014-09-01 15:26:37 +02:00
runProtoSampler.cxx Condition check before ending the main thread. 2014-09-01 15:26:37 +02:00
runProtoSink.cxx Condition check before ending the main thread. 2014-09-01 15:26:37 +02:00
runProxy.cxx Condition check before ending the main thread. 2014-09-01 15:26:37 +02:00
runSink.cxx Condition check before ending the main thread. 2014-09-01 15:26:37 +02:00
runSplitter.cxx Condition check before ending the main thread. 2014-09-01 15:26:37 +02:00