[PySide] most basic QThread problem

Frank Rueter | OHUfx frank at ohufx.com
Mon Dec 16 20:48:36 CET 2013


yes, that's exactly what I am aiming for, just wanted to get the basics 
right before I confuse myself too much :)

cheers,
frank

On 17/12/13 08:39, Sean Fisk wrote:
>
> Hi Frank,
>
> If you need to run a number of tasks, limit the amount that are 
> running concurrently, and would like to use Qt’s event system, then I 
> think |QThreadPool| 
> <http://seanfisk.github.io/pyside-docs/pyside/PySide/QtCore/QThreadPool.html> 
> with |setMaxThreadCount()| 
> <http://seanfisk.github.io/pyside-docs/pyside/PySide/QtCore/QThreadPool.html#PySide.QtCore.PySide.QtCore.QThreadPool.setMaxThreadCount> 
> is your best option.
>
> Sincerely,
>
>
>
> --
> Sean Fisk
>
>
> On Mon, Dec 16, 2013 at 2:32 PM, Frank Rueter | OHUfx <frank at ohufx.com 
> <mailto:frank at ohufx.com>> wrote:
>
>     Thanks Mat,
>     will wait() block concurrent threads?
>     In my case my app will receive an arbitrary amount of tasks and I need
>     to figure out how many of those tasks I want to run at the same time.
>     At the moment I am  using a simple threading.Thread ad
>     threading.BoundedSemaphore combo to sensibly limit the amount of
>     concurrent tasks (could be hundreds), and queue outstanding ones.
>     I would however like to switch to QThread as I have a feeling QT's
>     threading its more elegant than python's?!
>
>     Cheers,
>     frank
>
>
>
>     On 17/12/13 06:36, Matthew Woehlke wrote:
>     > On 2013-12-16 02:01, Frank Rueter | OHUfx wrote:
>     >> I am playing with simple QThread object and am getting the ol'
>     "QThread:
>     >> Destroyed while thread is still running" error.
>     > I would encourage you to always call wait() on your thread
>     before it is
>     > destroyed.
>     >
>
>     _______________________________________________
>     PySide mailing list
>     PySide at qt-project.org <mailto:PySide at qt-project.org>
>     http://lists.qt-project.org/mailman/listinfo/pyside
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20131217/707b4179/attachment.html>


More information about the PySide mailing list