6
votes
Definitive list of QGIS multiprocessing tools?
Thread safety
QGIS Processing algorithms can be thread-safe or not. According to the docs, the latter are :
[...] algorithms which manipulate the current project, layer selections, or with ...
6
votes
Using QObject inside thread in PyQGIS
By taking and simplifying the PyQGIS Cookbook example, here is an example :
from time import sleep
from qgis.core import QgsApplication, QgsTask
from PyQt5.QtCore import pyqtSignal
class MyTask(...
6
votes
Accepted
Sharing class variables across thread (QgsTasks) with pyQGIS
Here is working example. I have modified your code a bit. Because both your tasks have much the same function (to run a processing algorithm and return a result layer) I would prefer to only create ...
4
votes
Accepted
Setting up thread with busy progress indicator or GIF in PyQGIS
As in my answer in the post you linked, I create a QgsTask MyTask with a layer parameter.
I just adapt the content of your method buffering in the run method of the QgsTask.
I defined 2 signals (...
3
votes
Accepted
Missing Outputs with ArcPy RasterToASCII and ThreadPoolExecutor
Multithreading and ArcPy is a topic that comes up from time to time, usually on Esri Community. I believe part of my answer from Does arcpy support multithreading? - Esri Community a few years ago is ...
3
votes
Accepted
Conditional signals in QgsTask managing algorithm output
Try the example below. Sorry, your code was a bit of a mess, I basically tried to make it functional in the quickest way that I could. I suggest to now study the code and do your own research and self ...
3
votes
Accepted
QGIS loading a layer every 5 seconds (Threading)
The watchFile option, as mentioned in the documentation should be added to the uri string.
This is an example of how to add the option to your uri string:
uri = "file:///C:/Users/User/Desktop/...
3
votes
Accepted
Will core functions in QGIS exploit multi-threading?
I think that the answer for QGIS 3.0 may be found in this recent conversation posted in Nabble:
Will Processing in QGIS 3 support parallelization?
Citing Nyall Dawson:
If you're after ...
2
votes
Accepted
pyqgis threading - Exception when using QgsTask.fromFunction
It could be that you are missing a few self, try to change def test_run(task, wait_time): to def test_run(self, task, wait_time): and def test_completed(exception, result=None): to def test_completed(...
2
votes
QGIS plugin multithreading and loading memory layers
The worker thread should not interfere with the GUI. Make the worker thread as isolated / independent as possible - it should only interact with the GUI thread using signals.
You can use a signal to ...
2
votes
Accepted
QgsTask: finished-function isn't executed
i found the same question on the right sidebar. (QGIS QgsTaks finished and completed never called)
It says that QGIS tasks in plugins are broken, because the finished() and completed() functions are ...
1
vote
GIF freezes when QGIS plugin runs
The task manager must be returned from QgsApplication.taskManager() function.
So in the function called pipeline you should do this.
def pipeline(self):
# mgr = QgsTaskManager()
mgr = ...
1
vote
QgsVectorLayer creation in Qthread (PyQt)
Ok I'll give up, I tried everything I can think of. I deleted the object, I send the deleteLater signal to the metaObject of the task and so on. Nothing seems to work.
I used QThreads, QgsTasks as ...
1
vote
QGIS loading a layer every 5 seconds (Threading)
Complementing answer of Techie_Gus, you can activate option "Refresh Layer in interval(Seconds)" in CSV layer properties -> rendering menu.
1
vote
Using PyQGIS to create images from the QGIS print composer each showing a different layer?
This code seems to work for me:
from PyQt4.QtCore import *
from PyQt4.QtGui import *
outputFolder = "C:/Users/fsc/Documents/Temp/"
layers = iface.legendInterface().layers()
settings = iface....
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
multithreading × 48qgis × 15
pyqgis × 14
python × 10
qgis-plugins × 9
arcpy × 7
arcmap × 6
arcobjects × 5
qgis-3 × 4
parallel-processing × 4
gdal × 3
qgis-processing × 3
rasterio × 3
arcgis-desktop × 2
geoprocessing × 2
python-2.7 × 2
.net × 2
qthread × 2
python-add-in × 2
arcgis-10.2 × 1
arcgis-pro × 1
layers × 1
print-composer × 1
ogr × 1
ogr2ogr × 1