Skip to content
Permalink
Browse files

Fixes freeze of server during rendering

  • Loading branch information
pblottiere committed Oct 18, 2018
1 parent b379d75 commit 514db35cf81adb3539d1ab564da58934b192b8bc
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 #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 514db35

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