develooper Front page | perl.wxperl.users | Postings from July 2009

Re: Documentation?

Thread Previous | Thread Next
From:
Mattia Barbon
Date:
July 31, 2009 12:02
Subject:
Re: Documentation?
Message ID:
4A733F3F.5010206@libero.it
Steffen Mueller wrote:

   Hi,

> Octavian Rasnita wrote:
>> It is also very important to use threads in a app that uses a GUI, and I
>> don't know how easy is to use threads under Python, but under Perl is not
>> very easy, and the apps that use threads consume very many resources.
> 
> I agree. Some form of concurrency is extremely important for GUI apps. I 
> can't tell how easy or hard it is to use threads in Python, but it 
> slightly bothers me that they can't use multiple CPU cores. Not that 
> this is a problem for many applications...

   AFAIK threads in Python "just work": it does not take much time or 
RAM to create a thread (unlike Perl), you do not need to be aware that 
each thread has its own interpreter and that the easiest/safest way to 
pass data between threads is by serializing/deserializing it, and that 
when a thread is spawned all your objects will be cloned (and 
destructors will run twice!).

   All in all, I believe that most of the time threads are used for 
IO-bound stuff, and there Python GIL does not make much difference.

Regards,
Mattia


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About