[Python-ideas] Monitor implementation for the stdlib?

Aahz aahz at pythoncraft.com
Mon Oct 22 21:00:59 CEST 2007

[BTW, Chris, Guido as BDFL gets a pass on complaints about top-posting,
but you're not immune to them.  ;-)  Please use the standard formatting
of mixed quoting as I do below.]

On Sun, Oct 21, 2007, Christopher D. Leary wrote:
> Though I do think that the with statement is an excellent addition to
> the language (it avoids much of the ugliness and chance for error in
> symmetric P and V), I don't believe that it adequately covers the use
> case that monitors are intended for; namely, encapsulation and
> abstraction of the mutual exclusion involved in locking around /several
> data entities/ with /several defined functionalities/.

Seems to me that the "standard" Python technique for managing this is
message passing to a centralized thread using Queue.  What advantages do
monitors offer?

In any event, you will almost certainly not get monitors into the
standard library until they have proven themselves in the wild as a
module posted to PyPI.
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

The best way to get information on Usenet is not to ask a question, but
to post the wrong information.

More information about the Python-ideas mailing list