[Openmcl-devel] Initial bindings

Gary Byers gb at clozure.com
Wed Oct 6 09:06:39 UTC 2010



On Wed, 6 Oct 2010, Ron Garret wrote:

> This is unbelievably frustrating.  The default initial binding of ccl::*print-string-length* is 1000:

No, it isn't (at least not exactly).  The default value is the static,
global value of CCL:*PRINT-STRING-LENGTH*, which is set to NIL when
the image is built.

In many cases, that behavior's useful: it's more useful when the initial value
is some sort of stateful/shareable data structure (e.g., a stream.)  It's less
useful when the default initial value is a constant.

It's ordinarily hard to change those static/global bindings from a
thread that establishes dynamic bindings for those variables, and
PROCESS-RUN-FUNCTION establishes such bindings.  The initial thread
isn't created by PROCESS-RUN-FUNCTION, and therefore doing:

(setq ccl:*print-string-length* 1000)

in the initial thread - unless that occurs within the extent of a dynamic
binding of that variable in that thread - will modify the static value.

The IDE's event loop runs in the initial thread; it should really run with
standard thread-specific bindings in effect, to keep a random SETQ like
the one above from modifying global state.

>
> ;;;
> ;;; #<PROCESS foo(8) [Reset] #x302000DB1D0D> requires access to Shared Terminal Input
> ;;; Type (:y 8) to yield control to this thread.
> ;;;
>
> As an aside, following the instructions and typing (:y 8) in both the altconsole and the listener has no effect.

One general workaround for this problem is to avoid it completely.

See <http://trac.clozure.com/ccl/wiki/ReleaseNotes/Trunk>

(That wouldn't have helped in this case: the thread's getting an error before
establishing any dynamic thread-local bindings, including bindings of things
like *TERMINAL-IO*.)


>
> Grrrr.....
>
> rg
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list