[prev in list] [next in list] [prev in thread] [next in thread]
List: openmcl-devel
Subject: Re: [Openmcl-devel] defloadvar and def-ccl-pointers
From: Gary Byers <gb () clozure ! com>
Date: 2004-11-27 5:05:43
Message-ID: 20041126214203.X12156 () clozure ! com
[Download RAW message or body]
On Fri, 26 Nov 2004, Alan Ruttenberg wrote:
> When you are going to do a save-application and you need to
> reinitialize a variable when the lisp image starts again. For instance
> you might open a stream to a log file in your defvar. When you save a
> lisp image and exit, that stream gets closed. When the lisp application
> you saved starts again, if you try to write to the closed stream, you
> get an error. Same deal if you allocate some non-lisp memory structure
> for use with a system call. In these cases use defloadvar and the
> variable initialization forms are run again when the lisp image
> restarts.
>
> -Alan
One thing to note is that DEFLOADVAR should probably have been named
DEFLOADPARAMETER (in that it behaves more like DEFPARAMETER than
DEFVAR: whenever a DEFLOADVAR form is executed - if the containing
file is re-loaded or the form is executed via C-M-X or similar - it
changes the value of the variable.)
When a saved image is started, the initialization forms (functions)
associated with DEF-CCL-POINTERS are executed in the order that they
were first encountered. (This happens in the initial thread, and
happens before much of anything else happens.)
>
> On Nov 26, 2004, at 3:16 PM, alex crain wrote:
>
> >
> > What is the purpose of DEF-CCL-POINTERS?
> > I can get a handle on what it does, but it's not clear why.
> >
> > Put another way, when and why should I use DEFLOADVAR instead of
> > DEFVAR?
> >
> > :alex
> >
> > _______________________________________________
> > Openmcl-devel mailing list
> > Openmcl-devel@clozure.com
> > http://clozure.com/mailman/listinfo/openmcl-devel
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel@clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic