On Fri, Mar 5, 2010 at 7:47 AM, Simon King <simon.k...@nuigalway.ie> wrote:
> I created a ticket at
>  http://trac.sagemath.org/sage_trac/ticket/8444

Thanks Simon. I posted a patch with an explanation into that ticket,
which is now awaiting review (it's one line patch).

I was looking around gen.pyx, and there seems to be some more
unbalanced _sig_on / _sig_off pairs, and some dubious ones. But I
don't want to mess too much with that --- the proper fix would be to
rewrite _sig_on / _sig_off to allow nesting while checking the balance
at runtime. The hard part of this plan is that if we enforce balancing
these, we would need a huge amount of effort to actually fix sage in
places where there's no balance

We tried this with Craig back in SD5 days, and there were *a lot* of
unbalances --- though I think Craig committed fixes for some my 4.3.3
sage fails pretty badly at start if I add minimal checks like the ones
commented out in interrupt.h, even if I do it *only* for gen.pyx...

Maybe some general framework for this, more robust, can be made
directly into cython (cf. Brian Granger's efforts in another thread)
and sage usage of this can slowly migrate to the cython methods.

By robust I mean
 - reentrancy
 - proper nesting
 - threads
 - runtime balance check (warn/abort in case of unbalance)

What may actually be nice is to have some kind of support in cython to
declare we want signals enabled for a whole function (something like a
decorator or attribute). Cython would then add the calls to every
entry and exit point, so we avoid the common pitfall of missing some
exit code-paths.

Best,
Gonzalo

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to