Hello,
Be careful of mixing thread and mysql :
https://bugreports.qt-project.org/browse/QTBUG-31468
You should protect the calls to addDatabase with a mutex.
Le 30/05/2013 18:31, Karl Ruetz a écrit :
Both the documentation and my own experience say what you are after is
not possible:
htt
> On Thursday 30 May 2013 18:03:15 Witold E Wolski wrote:
>
>
> I am using threading to speed up compuation. Each thread produces some
> results which I would like to store in a sqlite file.
>
>
>
> My idea is to have something like an monitor object which has an
> QSqlDatabase member and a i
In the case that your computation is massive, you may want to change your
concurrency design. You can add a writer thread to be the only one who
talks to database. Other threads write their manipulated data into a
mutex-guarded shared data structure (say a queue). Then the writer thread
can write d
Both the documentation and my own experience say what you are after
is not possible:
http://qt-project.org/doc/qt-4.8/threads-modules.html#threads-and-the-sql-module
I do a similar thing only with MySQL. I am forced to create a
QSqlDatabase object with each thread. If I do not, I get dead lo
AFAIK what you are trying is not possible:
http://qt-project.org/doc/qt-4.8/threads-modules.html#threads-and-the-sql-module
Best,
Lorenz
Am 30.05.2013 18:03, schrieb Witold E Wolski:
> I am using threading to speed up compuation. Each thread produces some
> results which I would like to store in