[Qgis-developer] Bug? Python plug-in threadS seem to run only when Python console is busy.

Mikhail Titov mlt at gmx.us
Mon Jul 23 15:28:21 PDT 2012


All:

I am writing a multi-threaded python plug-in. It is meant to slowly
extract data from NLDAS-2 for selected features using OPeNDAP in the
background as I don't want to block GUI.

It seems that the thread I create in my plug-in is mostly dormant unless
I have something like time.sleep(alot) running in Python console. Is it
normal? I even tried to start QThread with QThread.HighPriority with the
same result:(

The module itself runs just fine when started outside of QGIS.

Am I not supposed to create threads in python plug-ins? I thought it
would be better rather than trying to dig around QCoreApplication to
process events so GUI is not frozen.

I'm running OSGeo4W versions of QGIS 1.8 on Windows XP SP3 32 bit if it
matters.

-- 
Mikhail


More information about the Qgis-developer mailing list