a soft real-time system using python
Brian McErlean
b_mcerlean at yahoo.com
Thu Aug 1 12:13:18 EDT 2002
a-steinhoff at web.de (Armin Steinhoff) wrote in message news:<ddc19db7.0208010135.217b551 at posting.google.com>...
> >
> >
> > For further information, we're already having a certain problem where python
> > threads seem to drastically decrease performance in the middle of the program
> > for around a second. Garbage collection has been disabled, but it's possible
> > that there is some other behind-the-scenes work that Python is doing.
>
> If you are using extensively dictionaries ... Python is using then
> extensively malloc of your syetem, that means any performance issues
> of the malloc lib will be visible.
>
> Have also in mind that blocking IO calls are blocking the _whole_
> interpreter!
> Python threads are not _system level_ threads!!
>
> Armin
Huh? Python threading _is_ implemented using system level threads,
and performing blocking IO does _not_ block the whole interpreter
(Assuming the call releases the Global Interpreter Lock, which all the
builtin ones do) You could potentially block the interpreter with a
custom C extension which performs a time-consuming task without
releasing the lock, but with the standard methods, blocking IO should
allow another thread to run.
Brian.
More information about the Python-list
mailing list