[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Usage of threads in PyQt
From:       "Pierre Barbier de Reuille" <pierre.barbierdereuille () gmail ! com>
Date:       2008-04-25 15:10:05
Message-ID: bb2c785c0804250810p7f5a3bb4h384dd998bcfa5d0c () mail ! gmail ! com
[Download RAW message or body]

On Fri, Apr 25, 2008 at 3:56 PM, Phil Thompson
<phil@riverbankcomputing.com> wrote:
> On Friday 25 April 2008, Sebastien Geffroy wrote:
>  > Hi all,
>  >
>  > I've read many docs on threads's usage in python and their limited
>  > interest because of the global lock who prevents simultaneous access of
>  > several threads to the VM.
>  >
>  > Is the problem similar with the threads implemented in PyQt ?
>
>  As it's Python and the same lock - yes.
>
>  Phil
>

That being said, the lock is released as soon as you do a system call.
So even though it is not ideal, it is still quite useful (unless you
do some processor intensive computation). Also, most library written
in another language will take care of releasing the lock as soon as
possible, especially if a function takes time to compute. In the end,
multi threading for the purpose of keeping the GUI alive does work!
The only case not working is multi threading for using two processors
(and then, it will work if you use a lower level language for the
computation itself).

-- 
Barbier de Reuille Pierre
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic