[Qgis-developer] Fwd: Threads in sextante
brush.tyler at gmail.com
Sat May 12 13:41:14 PDT 2012
On Sat, May 12, 2012 at 8:56 PM, Etienne Tourigny
<etourigny.dev at gmail.com> wrote:
> Any way ftools could be adapted to use the same approach as gdaltools?
yes, it could. The only problem running non-modal dialogs
are crashes accessing deleted objects like layers removed by
The solution implemented in GdalTools is to use the
QgsMapLayerRegistry signals to update the list of layers
and the combos.
> However - this hack might work - when the characteristic
> '0...10...20...30...40...50...60...70...80...90...100 - done.' output
> is detected (say after '0...10') then the output would be interpreted
> as progress report, which could be used to update the gui every 10% -
> until 100 is read. I have never seen output mixed with progress report
> in gdal utilities, although I may be wrong.
yes, it could be done.
>> Stopping/killing the execution thread should be enough.
>> GdalTools asks for confirmation and then does it.
> This has to be done manually, externally to qgis though.
> Would it be possible to have a "Cancel" button in the dialogs
> that would respond to user input, or respond to the Escape key
> when pressed?
Yes, why not?
I'm not sure I've understood.
>>> Also, this could enable several similar operations to be done in
>>> parallel - as long as they are not working on the same output files.
> Am I wrong to think that currently, 2 gdaltools operations could run
> concurrently with the same output file, with all associated problems?
uhm.. sorry, I've read too fast and I misunderstood your words.
No, I don't know what happens if two tools wrote on the same output,
though I think GDAL locks the output file until it finished.
Let's give me a try :)
BTW, why should two tools work on the same output file?
>>> On Fri, May 11, 2012 at 3:25 AM, Paolo Cavallini <cavallini at faunalia.it> wrote:
>>>> Il 10/05/2012 23:15, Martin Dobias ha scritto:
>>>>> What should be the benefit of multithreading here? To run algorithms
>>>>> outside from main thread so that GUI does not get blocked?
>>>> IMHO this is the main reason; I think the way GDALTools work is fine for the user.
>>>> All the best.
>>>> Paolo Cavallini - Faunalia
>>>> Full contact details at www.faunalia.eu/pc
>>>> Qgis-developer mailing list
>>>> Qgis-developer at lists.osgeo.org
>>> Qgis-developer mailing list
>>> Qgis-developer at lists.osgeo.org
>> Giuseppe Sucameli
More information about the Qgis-developer