[Kst] New version of cdf datasource

Nicolas.Brisset at eurocopter.com Nicolas.Brisset at eurocopter.com
Mon Sep 6 17:39:10 CEST 2004

Dear George,

following our discussion before the vacation, I implemented the cdf datasource 
differently to cache as much information as possible. As I said, I don't 
expect anybody using realtime cdf datafiles so that the current 
implementation would not see the changes. If the need arises, we will see how 
it can be fixed.
For now, physically opening the datafile only in the constructor and in 
readField() seems to have eliminated the crashed linked with threads 
simultaneously accessing the same file, so that I have not implemented any 
mutex. I am still a bit unsure whether there can still be concurrency cases, 
but I have not had any crashes. The questions to answer this definitely are:
1) can there be multiple instances of a datasource working on a same file ? 
(with e.g. one being in the constructor while the other is reading fields)
2) can multiple threads be reading different fields from the same source at 
the same time (I assume there won't be many threads reading the same field 
from a same file :-)) ?

Attached is the new version (I will produce a patch next time, but as I'm in a 
hurry and I don't think anybody is working on the cdf datasource anyway, it 
will be a plain file again this time).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: cdf.cpp
Type: text/x-c++src
Size: 9764 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kst/attachments/20040906/02154620/cdf.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cdf.h
Type: text/x-chdr
Size: 1787 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kst/attachments/20040906/02154620/cdf-0001.bin

More information about the Kst mailing list