Commit 6065e4c9 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Fixed concurrent_pointer_list_iterator checks. Some code adjustments to the new API of the rebase.

refs #384
parent ea84b740
......@@ -450,7 +450,7 @@ namespace campvis {
_geometryRenderer.p_geometryID.setValue(name + ".geometry");
_geometryRenderer.p_renderTargetID.setValue(name + ".rendered");
_geometryRenderer.validate(AbstractProcessor::INVALID_PROPERTIES);
_geometryRenderer.process(_localDataContainer, false);
_geometryRenderer.process(_localDataContainer);
// grab render result texture from local DataContainer and push into texture vector.
ScopedTypedData<RenderData> rd(_localDataContainer, name + ".rendered");
......
......@@ -55,7 +55,7 @@ namespace sigslot {
void signal_manager::run() {
_this_thread_id = std::this_thread::get_id();
std::unique_lock<tbb::mutex> lock(_ecMutex);
std::unique_lock<std::mutex> lock(_ecMutex);
while (! _stopExecution) {
// try pop the next event from the event queue
......
......@@ -56,7 +56,7 @@
#include <list>
#include "tgt/assert.h"
#include <tbb/compat/condition_variable>
#include <ext/threading.h>
#include <tbb/concurrent_queue.h>
#include <tbb/concurrent_vector.h>
......@@ -91,10 +91,9 @@ namespace sigslot {
}
concurrent_pointer_list_iterator& operator++() {
tgtAssert(_position != _end, "Trying to advance an iterator past the end!");
do {
++_position;
} while (_position != _end && *_position == nullptr);
} while (_position < _end && *_position == nullptr);
return *this;
}
......@@ -105,10 +104,9 @@ namespace sigslot {
}
concurrent_pointer_list_iterator& operator--() {
tgtAssert(_position != _begin, "Trying to advance an iterator befor the begin!");
do {
--_position;
} while (_position != _begin && *_position == nullptr);
} while (_position > _begin && *_position == nullptr);
return *this;
}
......@@ -127,11 +125,11 @@ namespace sigslot {
}
bool operator==(const concurrent_pointer_list_iterator& rhs) const {
return (_begin == rhs._begin && _position == rhs._position && _end == rhs._end);
return (_position == rhs._position);
}
bool operator!=(const concurrent_pointer_list_iterator& rhs) const {
return (_begin != rhs._begin || _position != rhs._position || _end != rhs._end);
return (_position != rhs._position);
}
protected:
......@@ -308,10 +306,10 @@ namespace sigslot {
/// Typedef for the signal queue
typedef tbb::concurrent_queue<_signal_handle_base*> SignalQueue;
SignalQueue _signalQueue; ///< Queue for signals to be dispatched
SignalQueue _signalQueue; ///< Queue for signals to be dispatched
std::condition_variable _evaluationCondition; ///< conditional wait to be used when there are currently no jobs to process
tbb::mutex _ecMutex; ///< Mutex for protecting _evaluationCondition
std::condition_variable _evaluationCondition; ///< conditional wait to be used when there are currently no jobs to process
std::mutex _ecMutex; ///< Mutex for protecting _evaluationCondition
std::thread::id _this_thread_id;
......
......@@ -381,8 +381,7 @@ namespace campvis {
}
}
void MatrixProcessor::DataContainerDataAdded(const std::string &name, const DataHandle &data)
{
void MatrixProcessor::DataContainerDataAdded(const std::string& name, DataHandle data) {
if (p_parserMode.getValue()) {
if (_dataDependencies.find(name) != _dataDependencies.end())
invalidate(INVALID_RESULT);
......
......@@ -103,7 +103,7 @@ namespace campvis {
CameraProperty p_cameraProperty;
void DataContainerDataAdded(const std::string& name, const DataHandle& data);
void DataContainerDataAdded(const std::string& name, DataHandle data);
protected:
/// \see AbstractProcessor::updateResult()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment