[Qgis-developer] pyqgis: parallel QThreads to services possible?

Nyall Dawson nyall.dawson at gmail.com
Tue May 3 13:56:31 PDT 2016


On 4 May 2016 06:36, "Richard Duivenvoorde" <rdmailings at duif.net> wrote:
>
> Hi Devs,
>
> my plugin needs to fire as quick as possible:
> - 24 (hourly) WPS requests to service A, resulting in a dir with shp/zips
> - >3 (slow) paging WFS requests (30000 features) to service B resulting
> in 3 gml files
> If all this is finished, show all the results in QGIS
>
> mostly using this page:
>
>
https://snorfalorpagus.net/blog/2013/12/07/multithreading-in-qgis-python-plugins/
>
> I created 'workers' for the services, and two different QThreads to be
> able to move the workers to.
>
> BUT when testing/running: I do not see 2 parallel service processes: I
> see first all 24 WPS request, and then the 3 slow WFS request (or the
> other way around if I change order of starting the threads...
>
> Anybody a clue or idea IF what I'm trying to achieve should be possible
> in this way? Or should I use other PyQT-machinery for this?
> Note that the gui-update is not even my biggest challence, I just want
> these two "slow" processes to run in parallel.

It's not an answer to your current predicament, but

https://github.com/qgis/QGIS/pull/3004

is designed to handle cases like this. I'd very much value it if you could
read over the comments on the PR and confirm that the PR design would meet
your needs (or not!)

Nyall
>
> Regards & TIA,
>
> Richard
>
> (untill now it is only in a cli interface using a QApplication)
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160504/1ef03d8c/attachment.html>


More information about the Qgis-developer mailing list