Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixes freeze of server during rendering
  • Loading branch information
pblottiere committed Oct 21, 2018
1 parent b379d75 commit 514db35
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/server/services/wms/qgsmaprendererjobproxy.cpp
Expand Up @@ -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 #18988).
QEventLoop loop;
QObject::connect( &renderJob, &QgsMapRendererParallelJob::finished, &loop, &QEventLoop::quit );
loop.exec();

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

0 comments on commit 514db35

Please sign in to comment.