Qt qsqlquery. Is exec () synchronization or async?

I am using built in dbbbbird with Qt provider. To work with db, I use the qsqlquery :: exec () function. Is this function synchronous or asynchronous?

+3


source to share


1 answer


QSqlQuery::exec()

blocks (synchronously) but not atomically, the OS can interrupt the thread and start another thread in between.



Note that you shouldn't share the same database connection across streams anyway, so it shouldn't be a problem.

+2


source







All Articles