Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
dev
-
-
703f2e3ce (dev)
-
Foundation PM Staging
Description
We use nested QEventLoops at some places in QtGrpc, e.g. the function:
QGrpcStatus QGrpcCallReply::waitForFinished() const { QEventLoop loop; QGrpcStatus status; QObject::connect(this, &QGrpcCallReply::errorOccurred, this, [&status, &loop](const QGrpcStatus &error) { status = error; loop.quit(); }); QObject::connect(this, &QGrpcCallReply::finished, &loop, &QEventLoop::quit); loop.exec(); return status; }
uses it. However, nesting event loops can cause conflicts with the main application event loop and can introduce all sorts of surprising behaviors as e.g. "stealing" the parent event loop.
Attachments
For Gerrit Dashboard: QTBUG-118097 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
515939,8 | Rid of synchronous gRPC API | dev | qt/qtgrpc | Status: MERGED | +2 | 0 |