Lowest hassle Python web server?
Neil Benn
benn at cenix-bioscience.com
Mon Mar 21 08:32:13 EST 2005
<snip>
>- Does threading cause any more of a hassle in Python than Java?
><snip>
>
>
Hello,
From the python docs, it states that the threading design is loosely
based upon the java module. Certainly, coming from Java I had little
trouble getting used to python threading. However heres some gotchyas :
- The thing to beware of there is something in Python called the GIL.
Read up about that before you start threading stuff - this will explain
to you why there is no volatile keyword - this got me confused at first.
- There is no synchronize keyword, instead you have to use locks which
can be obtained from the threading module
- There are no methods such as wait on an object (there is an event
object you can get to call wait upon - again threading)
- The handy concurrent stuff which has been introduced in J2SE5.0
mainly isn't in python - through you do get Queues in Python (maybe
more, I dunno?)
The GIL thing makes it easier to do threading with Python (there are
disadvantages to the GIL but I won't get into that here - if you're
interested read through the history on this group) but it's still
threading so beware!
Cheers,
Neil
--
Neil Benn
Senior Automation Engineer
Cenix BioScience
BioInnovations Zentrum
Tatzberg 46
D-01307
Dresden
Germany
Tel : +49 (0)351 4173 154
e-mail : benn at cenix-bioscience.com
Cenix Website : http://www.cenix-bioscience.com
More information about the Python-list
mailing list