[SoC] Report 1 - Multithread support on QGIS Processing toolbox

Marcus Santos mvcs at me.com
Sun May 31 08:18:20 PDT 2015


Hi Margherita,

Sorry, I forgot to add the link to the e-mail. Yes I already have a blog where I’m sharing my reports and other things related with the project [1].

Best regards,
Marcus Santos

[1] - https://qgisgsoc2015.wordpress.com <https://qgisgsoc2015.wordpress.com/>


> On 31 May 2015, at 16:03, Margherita Di Leo <diregola at gmail.com> wrote:
> 
> Hi Marcus,
> 
> thank you for your report! Please send us the link to the wiki page of your project. If you haven't yet set it up, please do it right away. It is very important for taking track of the progresses of your work. Thank you and happy hacking!
> 
> Margherita
> 
> On Fri, May 29, 2015 at 9:53 PM, Marcus Santos <mvcs at me.com <mailto:mvcs at me.com>> wrote:
> What do I have completed this week?
> 
> New implementation of the AlgorithmExecutor subclassing QObject. 
> Mechanism to deal with crashing Algorithms: when there is an exception during the algorithm execution, a signal is emitted in order to allow the main thread to make the other thread quit.
> Use signal to connect the algorithm progress signal to the setPercentage slot in the ProgressBar
> In the runAlgorithm method of the Processing class I changed the code associated with the runalg in order to support multithreading. Each time that an algorithm is running through the QGIS python console, a new thread and a new instance of the algorithm executor are created. The signals of the AlgorithmExecutor are connected to the thread signal in order to quit the thread and run the algorithm when the thread starts. While the algorithm is running, the main thread waits for the algorithm to finish and then proceed to show the output (first approach).
> 
> What am I going to achieve for the next week?
> 
> 
> Create a non-blocking version of the processing in order to make the interface not wait for the algorithm to finish.
> Solve the crash when starting the new thread.
> 
> Is there any blocking issue?
> 
> QGIS seems to crash randomly when starting the new thread and, when it doesn’t crash, the output of the algorithm is None, which may indicate that the algorithm is crashing in the new thread.
> 
> 
> _______________________________________________
> SoC mailing list
> SoC at lists.osgeo.org <mailto:SoC at lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/soc <http://lists.osgeo.org/mailman/listinfo/soc>
> 
> 
> 
> -- 
> Best regards,
> 
> Dr. Margherita DI LEO    
> Scientific / technical project officer
> 
> European Commission - DG JRC 
> Institute for Environment and Sustainability (IES)
> Via Fermi, 2749
> I-21027 Ispra (VA) - Italy - TP 261
>        
> Tel. +39 0332 78 3600   
> margherita.di-leo at jrc.ec.europa.eu <mailto:margherita.di-leo at jrc.ec.europa.eu>
> 
> Disclaimer: The views expressed are purely those of the writer and may not in any circumstance be regarded as stating an official position of the European Commission.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/soc/attachments/20150531/28891775/attachment-0001.html>


More information about the SoC mailing list