[Kst] kst_hfi_calib_branch: kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Tue Nov 9 16:31:22 CET 2004
CVS commit by staikos:
fix a major deadlock issue with the reload action. This needs a backport.
Can someone please review it? Thanks.
M +5 -3 kstrvector.cpp 1.64.2.1
--- kdeextragear-2/kst/kst/kstrvector.cpp #1.64:1.64.2.1
@@ -17,4 +17,5 @@
***************************************************************************/
+#include <assert.h>
#include <math.h>
#include <stdlib.h>
@@ -595,12 +596,13 @@ void KstRVector::reload() {
//
KstDataSourcePtr newsrc = KstDataSource::loadSource(_file->fileName(), _file->fileType());
- _file->writeUnlock();
+ assert(newsrc != _file);
if (newsrc) {
+ _file->writeUnlock();
KST::dataSourceList.lock().writeLock();
KST::dataSourceList.remove(_file);
- KST::dataSourceList.append(newsrc);
- KST::dataSourceList.lock().writeUnlock();
_file = newsrc;
_file->writeLock();
+ KST::dataSourceList.append(_file);
+ KST::dataSourceList.lock().writeUnlock();
reset();
}
More information about the Kst
mailing list