[Nice analysis from Michael Chermside]
> The concept of a "critical section" makes great sense when there is
> effectively only one CPU: just stop switching threads. But if code
> is using multiple CPUs, what does it mean? Shut down the other CPUs?
 . . .
> I think it is unwise to build such a
> feature into the Python language. Supporting it in CPython only
> requires (I think) no more than a very simple C extension. I think
> it should stay as an extension and not become part of the language.

That makes sense.

Once place where we already have CPython specific support is in 
sys.setcheckinterval().  That suggests adapting that function or adding a new 
one to  temporarily stop switching, almost the same as 
sys.setcheckinterval(sys.maxint) but continuing to perform other periodic 
checks 
for control-break and such.


Raymond

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to