#10818: EclLib should allow signals to make LISP code interruptable
------------------------------------------+---------------------------------
   Reporter:  nbruin                      |       Owner:  was                   
   
       Type:  defect                      |      Status:  needs_work            
   
   Priority:  major                       |   Milestone:  sage-4.7              
   
  Component:  interfaces                  |    Keywords:  lisp ecl signal 
interrupt
     Author:  Nils Bruin, Jeroen Demeyer  |    Upstream:  N/A                   
   
   Reviewer:  Jean-Pierre Flori           |      Merged:                        
   
Work_issues:                              |  
------------------------------------------+---------------------------------
Changes (by jpflori):

  * status:  needs_review => needs_work


Comment:

 I'm sorry to complain a little more about the test you put, but I think
 putting something python-ish at that place is a bad idea.

 Of course because you will actually leave "sig_on()" in "ecl_sig_on()",
 that won't cause any problems, but if we were to leave out "sig_on()"  we
 won't see "Failure" printed (the SIGINT will get caught before, and that
 is the main reason which makes it a bad test for me) and that will
 completely break interrupt handling (pressing Ctrl-C afterwards will lead
 you into Lisp debugger, I don't even know how to get out of there without
 pressing Ctrl+\). So IMHO that is not a good example to clearly understand
 what is going on with interrupt handling for someone who is not acquainted
 to it (just as me !).

 Therefore I put something C-ish (but too complicated I agree) in there.
 Without "sig_on()", at least it should not lead to a broken situation
 because the interrupt only gets caught after the C-ish part is finished
 (but my example is even worse than yours because the C-ish part never
 ends...).

 So you could just add a line stating that even with sig_on(), "Failure !"
 will not be printed, or a little explanatory paragraph in a note rather
 than just comments inside sage code.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10818#comment:22>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to