Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

python threads?



On 5/27/07, Stephen Adler <adler-wRvlPVLobi1/31tCrMuHxg at public.gmane.org> wrote:
> Spawning 3 threads, I get 115%.... So I'm wondering why the python
> thread does not use up two full CPU's? My code, and some time commands
> follow...

I believe that this was a purposeful design decision, but I can't dig
up the reference right now.  I think I read it in the Python 2.5
tutorial.  In any event, Python threading has many flaws and you will
encounter them as you experiment.  Maybe you could try utilizing an
event-based architecture rather than spawning off a slew of threads...

Check out the Twisted library for Python, which is event-based and
geared for networking tasks...
-- 
Kristian Hermansen

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.







BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org