I already did it, but I forgot to hit the reply all button and replied
only to mr. Llama X.

On Mon, Jul 11, 2011 at 3:07 PM, Renato Araujo Oliveira Filho
<[email protected]> wrote:
> This is a problem with QThreadPool.globalInstance in return policy.
>
> Could you report a bug about that?
>
> Thanks
>
> On Mon, Jul 11, 2011 at 2:51 PM, llama X <[email protected]> wrote:
>> Hi, I'm still new to Qt and was trying out threading.  I wrote this
>> little code sample to simulate pooling of slow-running threads:
>>
>> import time
>> from PySide.QtCore import QTime, QRunnable, QThreadPool
>>
>> class Task(QRunnable):
>>    def run(self):
>>        t = QTime()
>>        t.start()
>>        time.sleep(2) # Sleep 2 seconds
>>        print 'Slow thread has wasted', t.elapsed(), 'ms'
>>
>> if __name__ == '__main__':
>>    while True:
>>        task = Task()
>>        QThreadPool.globalInstance().start(task)
>>        time.sleep(1) # Sleep 1 second
>>
>> This segfaults when run under PySide, while it works with PyQt4.  Is
>> this a bug or am I just going about this the wrong way?
>> _______________________________________________
>> PySide mailing list
>> [email protected]
>> http://lists.pyside.org/listinfo/pyside
>>
>
>
>
> --
> Renato Araujo Oliveira Filho
> Instituto Nokia de Tecnologia - INdT
> _______________________________________________
> PySide mailing list
> [email protected]
> http://lists.pyside.org/listinfo/pyside
>
_______________________________________________
PySide mailing list
[email protected]
http://lists.pyside.org/listinfo/pyside

Reply via email to