Feature request #5396

Run algorithms in a different thread

Added by Julien Malik almost 5 years ago. Updated almost 2 years ago.

Status:In Progress Start Date:04/17/2012
Priority:High Due date:
Assigned to:Victor Olaya % Done:

0%

Category:Processing/Core
Target version:Future Release - High Priority
Platform: Resolution:
Platform version: Pull Request or Patch supplied:No
Status info: Tag:

Description

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

mt3.diff (16.8 kB) Camilo Polymeris, 06/04/2012 02:59 pm

mt4.diff (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

History

Updated by Camilo Polymeris almost 5 years ago

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

Updated by Victor Olaya almost 5 years ago

Perfect!

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

Updated by Camilo Polymeris almost 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?

Updated by Victor Olaya almost 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.

Updated by Paolo Cavallini almost 5 years ago

  • Assigned to changed from Victor Olaya to Camilo Polymeris

Updated by Camilo Polymeris almost 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).

Updated by Camilo Polymeris almost 5 years ago

Iteration should work with the attached patch.

Updated by Giovanni Manghi over 2 years ago

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

Updated by Giovanni Manghi over 2 years ago

  • Category set to Processing/Core

Updated by Giovanni Manghi over 2 years ago

  • Assigned to changed from Camilo Polymeris to Victor Olaya

Updated by Paolo Cavallini over 2 years ago

Possibly duplicated in http://hub.qgis.org/issues/11324

Updated by Giovanni Manghi almost 2 years ago

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

Also available in: Atom