Skip to content
Permalink
Browse files

Merge pull request #8228 from pblottiere/server_deadlock

[server] Fixes freeze of server during rendering
  • Loading branch information
pblottiere committed Oct 22, 2018
2 parents 4fa62e9 + ef4bf1a commit dfb28fed4473f0bae40d568a0ed99c5560b8efb5
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/server/services/wms/qgsmaprendererjobproxy.cpp
@@ -56,6 +56,13 @@ namespace QgsWms
renderJob.setFeatureFilterProvider( mFeatureFilterProvider );
#endif
renderJob.start();

// Allows the main thread to manage blocking call coming from rendering
// threads (see discussion in https://issues.qgis.org/issues/18988).
QEventLoop loop;
QObject::connect( &renderJob, &QgsMapRendererParallelJob::finished, &loop, &QEventLoop::quit );
loop.exec();

renderJob.waitForFinished();
*image = renderJob.renderedImage();
mPainter.reset( new QPainter( image ) );

0 comments on commit dfb28fe

Please sign in to comment.
You can’t perform that action at this time.