guile-user
[Top][All Lists]
Advanced

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

Re: scm_shell in C-Thread - Quit vs. Terminal Corruption


From: kai . selgrad
Subject: Re: scm_shell in C-Thread - Quit vs. Terminal Corruption
Date: Sun, 18 Oct 2009 17:48:53 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

Hej Neil.

On 16:05 Sun 18 Oct     , Neil Jerram wrote:
> Calling scm_shell() with no args means just that that thread will run
> `(top-repl)' - whose definition you can see in boot-9.scm.  In other
> words you could say that the default args are like `-c (top-repl)'.
> 
> `(quit)' means (throw 'quit ...), and the (top-repl) code handles this
> by exiting its internal loop.  Then scm_shell() calls exit().
> 
> So, if you want something else to happen after `(quit)', such as waiting
> for other threads to terminate and clean up, you just need to put code
> for that in a procedure named, e.g. `wait-for-cleanup', and then call
> scm_shell() with args `-c (begin (top-repl) (wait-for-cleanup)'.

That sounds pretty good, thank you! I think I should be able to get my
stuff working with this information. :)
I will give it a try this week.

        Kai.





reply via email to

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