Feature request #5396

Run algorithms in a different thread

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

Status:In ProgressStart date:04/17/2012
Priority:HighDue date:
Assignee: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 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

History

#1 Updated by Camilo Polymeris about 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 about 5 years ago

Perfect!

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 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?

#4 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.

#5 Updated by Paolo Cavallini almost 5 years ago

  • Assignee changed from Victor Olaya to Camilo Polymeris

#6 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).

#7 Updated by Camilo Polymeris almost 5 years ago

Iteration should work with the attached patch.

#8 Updated by Giovanni Manghi over 2 years ago

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

#9 Updated by Giovanni Manghi over 2 years ago

  • Category set to Processing/Core

#10 Updated by Giovanni Manghi over 2 years ago

  • Assignee changed from Camilo Polymeris to Victor Olaya

#11 Updated by Paolo Cavallini over 2 years ago

Possibly duplicated in #11324

#12 Updated by Giovanni Manghi almost 2 years ago

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

Also available in: Atom PDF