Feature request #5396

Run algorithms in a different thread

Added by Julien Malik over 5 years ago. Updated 3 months ago.

Status:In Progress
Assignee:Victor Olaya
Pull Request or Patch supplied:No Resolution:
Easy fix?:No


Currently the module execution freezes the main GUI.
Execution of the modules should not be done on the main thread.

mt3.diff Magnifier (16.8 KB) Camilo Polymeris, 06/04/2012 02:59 PM

mt4.diff Magnifier (16 KB) Camilo Polymeris, 06/04/2012 06:29 PM

Related issues

Duplicated by QGIS Application - Feature request #11324: Let Processing windows being non-blockers of the interface Closed 10/04/2014


#1 Updated by Camilo Polymeris over 5 years ago

I'll have a look at this during the next days, if nobody else is working on it.

#2 Updated by Victor Olaya over 5 years ago


There is a class named AlgorithmExecutor. That's where it should go. If you have questions, just ask me, ok?

#3 Updated by Camilo Polymeris about 5 years ago

Was implementing this in the GUI code, but am not longer sure that is the right approach. Perhaps it should be lower level, so the functionality can be used in other parts of the code?

#4 Updated by Victor Olaya about 5 years ago

IT should go on the AlgorithmExecutor Class. All other classes call it when executing an algorithm. It is on the gui package because it is used by gui elements, but we can move it later to another one. It is not itself a GUI class.

#5 Updated by Paolo Cavallini about 5 years ago

  • Assignee changed from Victor Olaya to Camilo Polymeris

#6 Updated by Camilo Polymeris about 5 years ago

This weeks diff. Includes mostly GUI improvements (percentage, feedback and a close button) and some attempts at making the iteration code work. I'll update the blog at sextante-gsoc.blogspot.com with more details, but here some technical considerations:

  • Am getting crashes with the (working thread) iteration code, apparently accesses to QPixmap, but haven't been able to find the source of the problem.
  • Using "new-style" PyQT slots and signals. Is that ok?

Note that the cancel button only disconnects the finished signal, since the backends don't support cancelling. One could just terminate them, but that might be problematic (file access and such).

#7 Updated by Camilo Polymeris about 5 years ago

Iteration should work with the attached patch.

#8 Updated by Giovanni Manghi almost 3 years ago

  • Project changed from 78 to QGIS Application
  • Category deleted (63)

#9 Updated by Giovanni Manghi almost 3 years ago

  • Category set to Processing/Core

#10 Updated by Giovanni Manghi almost 3 years ago

  • Assignee changed from Camilo Polymeris to Victor Olaya

#11 Updated by Paolo Cavallini almost 3 years ago

Possibly duplicated in #11324

#12 Updated by Giovanni Manghi about 2 years ago

  • Status changed from Open to In Progress
  • Priority changed from Normal to High
  • Target version set to Future Release - High Priority

#13 Updated by Giovanni Manghi 3 months ago

  • Easy fix? set to No

Also available in: Atom PDF