https://bugs.kde.org/show_bug.cgi?id=161783Gilles Caulier <
[hidden email]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |
[hidden email]
Version|0.9.3 |3.0.0
--- Comment #10 from Gilles Caulier <
[hidden email]> ---
Islam,
In your code, you have used QtConcurrentRun, QFuture, and QFutureWatcher.
KDE provide a more simplest way to manage parallelization of thread, through
ThreadWeaver KDE API :
http://api.kde.org/4.8-api/kdelibs-apidocs/threadweaver/html/index.htmlWe already use it in kipi-plugins with this wrapper class :
https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/revisions/master/show/common/libkipiplugins/tools/threadsWe use it already in some plugins based on ActionThread Class as
CameraControler :
https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/revisions/master/entry/dngconverter/plugin/actionthread.h#L47https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/revisions/master/entry/jpeglossless/plugin/actionthread.h#L47https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/revisions/master/entry/timeadjust/actionthread.h#L49https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/revisions/master/entry/rawconverter/manager/actionthread.h#L55The goal is to run more than one thread at the same time, according with CPU
core available. For ex, if you use an i5 computer, 4 core are available, so 4
images are processed at the same time.
Look the test implementation done in kipi-plugins based on JPEGLossLess core
tool :
https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/revisions/master/show/tests/multithreading... it's a stand alone test program...
I don't have checked/tested your code, but if you try to parallelize processing
in digiKam import tool, i recommend highly to use kpactionthreadbase.cpp
implementation in digiKam core. Personally, i plan to use it into
BatchQueueManager in the future. i will share this class between kipi-plugins
and digiKam through libkdcraw or libkexiv2 (both depend of this libraries).
What do you think about ?
Gilles Caulier
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel