In article <[email protected]>, k3xji <[email protected]> wrote: > >I want unpreempted behavior for some application and do some testing >as below. Well the unpreemption behavior is working fine with >sys.setcheckinterval(sys.maxint). However, when I set the interval to >a lower value, the thread does not being preempted anymore, it runs >until it is finished.
I'm sorry, I think English is not your primary language, and I can't quite understand what you mean here. Please rephrase. Note that sys.setcheckinterval() is *not* designed to force threads to run to completion, only to allow you to change the time chunk for a thread to process, and if anything goes through the GIL, the thread may yield. To force a thread to be the only thread running, you need to use some kind of locking. -- Aahz ([email protected]) <*> http://www.pythoncraft.com/ "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." --Red Adair -- http://mail.python.org/mailman/listinfo/python-list
