Hi,

I noticed, in the git, that QFuture is still default initialized as 
QFutureInterface<T>::canceledResult()

But this results in strange status messages (is started and is finished) for a 
newly created Futures.

Right now if define a future as member in a class, I cannot count on its status 
report to do some work with it.
In the relevant code I should be testing it if its started and if it is still 
running, otherwise - use it, or just test it if its finished.
But all these test will pass if the Future is not initialized with work at all! 
(resulting in a crash)

Am I missing some part of the concept? For me an empty QFuture is not started, 
and what is not started is not finished.
This way one can safely use a future without knowing (or being interested) if 
its is ever going to do some work and produce a result.

Now I have to use workarounds. 
(give the future work right away; track if its initialized manually; ...or 
maybe cout on this canceledResult as a spacial initial status?)

feedback is welcome, Thank You
MihailNaydenov


      

_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback

Reply via email to