Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: ... > This is vaguely possible using sys.setcheckinterval() now, although one > has to pick a ridiculously large number and hope that the atomic operation > takes fewer than that many opcodes. > > Spelling "do not switch threads" as sys.setcheckinterval(None) seems > somewhat natural, though. Perhaps that would be a fruitful direction to > explore.
Indeed, it's a simple enough idea that it's worth proposing to python-dev for consideration for 2.5, since the patch connected to implementing it should be tiny. The only issue is whether Python (meaning Guido) WANTS to change in order support this rough-and-ready approach to multithreading; I hope he doesn't, but if he does we might as well get it over with now. Alex -- http://mail.python.org/mailman/listinfo/python-list