Python un-plugging the Interpreter

J

John Nagle

Eric Raymond's "The Art of Unix Programming" sums up the threading
criticism, I think:

http://catb.org/~esr/writings/taoup/html/multiprogramchapter.html

What that really reflects is that threads came late to UNIX.
The locking primitives weren't standardized for years, signals took
a decade to settle down, interprocess message passing was weak and
still is, and some parts of the context, like the current directory,
are per-process while they should be per-thread. To this day,
threading remains an afterthought in the UNIX/Linux/C world.

This really isn't a Python topic, but if you want to see threading
and interprocess communication done right, look at QNX 6.
True message passing, well defined semantics for thread cancellation,
the ability to time out any system call that blocks, and defined
atomic operations are all there. All the thread machinery that has to
work right is well worked out and well documented.

John Nagle
 
H

Hendrik van Rooyen

It's the other way around for me -- using a threaded design looks
superficially more linear, but all the complexity is still there, and
then some. I mean, threads are well known for causing surprising and
hard-to-track-down (and hard to trigger!) bugs and performance
problems.

(I'm comparing with the Unix select() call, and I assume the APIs I
want to use are designed to work with select(). i.e. use select()able
file descriptors.)

This is a valuable insight - it is to a large extent true that threading is
used to "front end" i/o - but that is not its only use...

I tend to use it to build, via Queue glue, structures that resemble
systolic arrays - where each thread does a small part of a whole job.
Good. My viewpoint is due to my Unix background (but I'm not
insinuating that all Unix users dislike threads).

Eric Raymond's "The Art of Unix Programming" sums up the threading
criticism, I think:

http://catb.org/~esr/writings/taoup/html/multiprogramchapter.html

/Jorgen

Thanks - interesting link. This guy really is not turned on by threading...

- Hendrik
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,832
Latest member
UtaHetrick

Latest Threads

Top