[Pythonmac-SIG] PackageManager / Python 2.3.x - 2.4 ideas
Schollnick, Benjamin
Benjamin.Schollnick at usa.xerox.com
Fri Aug 1 10:26:02 EDT 2003
> > I mostly agree... as I indicated, I had a learning curve, but my
> > threading generally works fine...
> >
> > (I've only had to thread two apps / libraries. And that was a while
> > ago....)
> >
> > I was really attempting to see what he thought "Sucks"
> about the Threading
> > model.... To see if I agreed, or might be able to help...
>
> AIUI, the "threading sucks" viewpoint has more-or-less nothing to do
> with Python. Some of the reasons I mistrust threading are explained
> very well in
>
> http://www.advogato.org/person/graydon/diary.html?start=103
>
> In general, concurrency seems to be hard. I didn't think this was
> news :-)
This is a little too general...
Concurrency does require a good examination of what is happening, and the
project flow...
But what I found worked in multiple cases, was reducing the issue, until I
had
the "actions" being handled by a object. Thus I would create multiple
objects, and
pass them into the threads for servicing. Once the thread finished, I would
retrieve
the data from the object, destroy the object, and continue on...
Yes, this model does not work every where... But often, when working in a
OOP model,
I keep coming back to a similiar model...
Threading in a non-OOP environment is harder... When I rewrote parts of
Stathost,
and made it into a multithreaded application, to speed it up... I had to
basically
graft a OOP manager on top of the system for the threading... But it was
not difficult..
- Benjamin
More information about the Pythonmac-SIG
mailing list