[Kst] branches/work/kst/hierarchy/kst/src/libkstapp
Eli Fidler
eli at staikos.net
Sat Dec 16 00:13:48 CET 2006
SVN commit 613994 by fidler:
lock before findTag
M +14 -0 kstdatamanager_i.cpp
--- branches/work/kst/hierarchy/kst/src/libkstapp/kstdatamanager_i.cpp #613993:613994
@@ -162,7 +162,9 @@
switch (_rtti) {
case RTTI_OBJ_DATA_VECTOR:
{
+ KST::vectorList.lock().readLock();
KstRVectorPtr x = kst_cast<KstRVector>(*KST::vectorList.findTag(_name));
+ KST::vectorList.lock().unlock();
if (x) {
x->readLock();
// getUsage: subtract 1 for KstRVectorPtr x
@@ -195,7 +197,9 @@
}
case RTTI_OBJ_STATIC_VECTOR:
{
+ KST::vectorList.lock().readLock();
KstSVectorPtr x = kst_cast<KstSVector>(*KST::vectorList.findTag(_name));
+ KST::vectorList.lock().unlock();
if (x) {
x->readLock();
// getUsage: subtract 1 for KstRVectorPtr x
@@ -225,7 +229,9 @@
}
case RTTI_OBJ_VECTOR:
{
+ KST::vectorList.lock().readLock();
KstVectorPtr x = *KST::vectorList.findTag(_name);
+ KST::vectorList.lock().unlock();
if (x) {
x->readLock();
// getUsage:
@@ -250,7 +256,9 @@
}
case RTTI_OBJ_OBJECT:
{
+ KST::dataObjectList.lock().readLock();
KstDataObjectPtr x = *KST::dataObjectList.findTag(_name);
+ KST::dataObjectList.lock().unlock();
if (x) {
x->readLock();
QString field = x->typeString();
@@ -337,7 +345,9 @@
}
case RTTI_OBJ_DATA_MATRIX:
{
+ KST::matrixList.lock().readLock();
KstRMatrixPtr x = kst_cast<KstRMatrix>(*KST::matrixList.findTag(_name));
+ KST::matrixList.lock().unlock();
if (x) {
x->readLock();
// getUsage: subtract 1 for KstRMatrixPtr x
@@ -363,7 +373,9 @@
}
case RTTI_OBJ_STATIC_MATRIX:
{
+ KST::matrixList.lock().readLock();
KstSMatrixPtr x = kst_cast<KstSMatrix>(*KST::matrixList.findTag(_name));
+ KST::matrixList.lock().unlock();
if (x) {
x->readLock();
// getUsage: subtract 1 for KstRMatrixPtr x
@@ -387,7 +399,9 @@
}
case RTTI_OBJ_MATRIX:
{
+ KST::matrixList.lock().readLock();
KstMatrixPtr x = *KST::matrixList.findTag(_name);
+ KST::matrixList.lock().unlock();
if (x) {
x->readLock();
// getUsage:
More information about the Kst
mailing list