[Python-ideas] Protecting finally clauses of interruptions

Yury Selivanov yselivanov.ml at gmail.com
Thu Apr 5 01:19:41 CEST 2012

On 2012-04-04, at 6:45 PM, Paul Colomiets wrote:

> It's similar to sys.settrace() except it only executed when
> finally counter decremented to 0, right?
> Flag `f_in_finally` is still there, right?

Yes, please keep it.  With your current proposal, it's the only
way to see if it is safe to interrupt coroutine right now, or 
we have to wait until the callback gets called.

> Yury, is it ok if l'll start a PEP with this idea, and when
> it will have some support (or be rejected), you'll come
> up with thread interruption proposal?

Sure, go ahead.  If I'm lucky enough to come up with a better 
proposal I promise to shout about it loud ;)


More information about the Python-ideas mailing list