<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><p style="box-sizing: border-box; border: 0px; font-family: Lato, sans-serif; margin: 0px 0px 1.7em; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(68, 68, 68); line-height: 30px;" class=""><span style="font-size: 14px;" class=""><strong style="box-sizing: border-box; border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;" class="">What do I have completed this week?</strong><br style="box-sizing: border-box;" class=""></span></p><ul style="box-sizing: border-box; border: 0px; font-family: Lato, sans-serif; margin: 0px 0px 1.7em 3em; outline: 0px; padding: 0px; vertical-align: baseline; list-style-position: initial; list-style-image: initial; color: rgb(68, 68, 68); line-height: 30px;" class=""><li style="box-sizing: border-box; border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;" class=""><span style="font-size: 14px;" class="">New implementation of the <em style="box-sizing: border-box; border: 0px; font-family: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;" class="">AlgorithmExecutor</em> subclassing QObject. </span></li><li style="box-sizing: border-box; border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;" class=""><span style="font-size: 14px;" class="">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.</span></li><li style="box-sizing: border-box; border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;" class=""><span style="font-size: 14px;" class="">Use signal to connect the algorithm progress signal to the setPercentage slot in the ProgressBar</span></li></ul><p align="justify" style="box-sizing: border-box; border: 0px; font-family: Lato, sans-serif; margin: 0px 0px 1.7em; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(68, 68, 68); line-height: 30px;" class=""><span style="font-size: 14px;" class="">In the runAlgorithm method of the <em style="box-sizing: border-box; border: 0px; font-family: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;" class="">Processing</em> 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).</span></p><p style="box-sizing: border-box; border: 0px; font-family: Lato, sans-serif; margin: 0px 0px 1.7em; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(68, 68, 68); line-height: 30px;" class=""><span style="font-size: 14px;" class=""><strong style="box-sizing: border-box; border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;" class="">What am I going to achieve for the next week?</strong><br style="box-sizing: border-box;" class=""></span></p><p align="justify" style="box-sizing: border-box; border: 0px; margin: 0px 0px 1.7em; outline: 0px; padding: 0px; vertical-align: baseline;" class=""><ul class="MailOutline"><li style="color: rgb(68, 68, 68); font-family: Lato, sans-serif; line-height: 30px;" class=""><span style="font-size: 14px;" class="">Create a non-blocking version of the processing in order to make the interface not wait for the algorithm to finish.</span></li><li style="color: rgb(68, 68, 68); font-family: Lato, sans-serif; line-height: 30px;" class=""><span style="font-size: 14px;" class="">Solve the crash when starting the new thread.</span></li></ul></p><p style="box-sizing: border-box; border: 0px; font-family: Lato, sans-serif; margin: 0px 0px 1.7em; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(68, 68, 68); line-height: 30px;" class=""><span style="font-size: 14px;" class=""><strong style="box-sizing: border-box; border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;" class="">Is there any blocking issue?</strong><br style="box-sizing: border-box;" class=""></span></p><p align="justify" style="box-sizing: border-box; border: 0px; font-family: Lato, sans-serif; margin: 0px 0px 1.7em; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(68, 68, 68); line-height: 30px;" class=""><span style="font-size: 14px;" class="">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.</span></p></body></html>