chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-janitors] #1067: Variable set! in signal handler is optimis


From: Chicken Trac
Subject: Re: [Chicken-janitors] #1067: Variable set! in signal handler is optimised away in other code.
Date: Tue, 19 Nov 2013 17:25:45 -0000

#1067: Variable set! in signal handler is optimised away in other code.
----------------------+-----------------------------------------------------
  Reporter:  andyjpb  |       Owner:         
      Type:  defect   |      Status:  new    
  Priority:  major    |   Milestone:  someday
 Component:  unknown  |     Version:  4.8.x  
Resolution:           |    Keywords:         
----------------------+-----------------------------------------------------

Comment(by andyjpb):

 Everything is in the same module:


 {{{
 (module ...

 > (define keep-going "yes") ; #t seems to cause the (if keep-going ...)
 check to get optimised away.
 >
 > ...
 >
 > (define (shutdown #!optional signum)
 >  (debug! "Proclaim got signal ~A: shutting down..." signum)
 >  (set! keep-going #f))
 >
 > (define (handler)
 >   (set-signal-handler! signal/term shutdown)
 >
 > ...
 >
 > (if keep-going
 >   (begin
 >     ...
 >     (loop)))
 >
 > ...
 > )
 )
 }}}

-- 
Ticket URL: <http://bugs.call-cc.org/ticket/1067#comment:1>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]