25 Oct
2012
25 Oct
'12
7:04 a.m.
On 25/10/12 12:43, Guido van Rossum wrote:
Note that in a world with only blocking calls this *can* be a problem... a common approach to giving operations a timeout is sending it a SIGTERM
Well, yes, if you have preemptive interruptions of some kind, then things are a lot trickier. But I'm assuming we're using cooperative scheduling *instead* of things like that. (Note that in the face of preemption, I don't think it's possible to solve this problem completely without language support, because there will always be a small window of opportunity between entering the finally clause and getting into the with-statement or whatever that you're using to block asynchronous signals.) -- Greg