[Openmcl-devel] yielding to a thread

Gary Byers gb at clozure.com
Wed Jun 30 10:24:52 UTC 2004

On Wed, 30 Jun 2004, Marco Baringer wrote:

> lately i can't seem to yield (:Y) to a thread anymore.
> Here's a cut 'n paste from the terminal:
> nil
> ;;;
> ;;; #<PROCESS Initial(0) [Active] #x610260E> requires access to Shared Terminal Input
> ;;;
> ? :PROC
> 6 :    repl-thread  [semaphore wait]
> 4 :    control-thread  [semaphore wait]
> 1 : -> listener     [Active]
> 0 :    Initial      [semaphore wait]
> ? (:Y 0)
> ?
> i've got this OpenMCL instance still running, is there something i
> should try?
> --
> -Marco

The quick return from :Y back to a ? prompt is exactly what happens if
the specified thread doesn't seem to be waiting for terminal input (if
true, that certainly contradicts what the message said ...)

The possibilities that come to mind include:

a) thread 0 was waiting for the terminal, but quietly abandoned the
b) thread 0 was waiting for the terminal, but the :Y command didn't
see it.  (I'm not sure how it would miss it, but ...).
c) thread 0 was waiting for some other terminal
d) it's not really the initial thread that's waiting for the tty.
One of the first things that a thread does when it start up is to
bind CCL:*CURRENT-PROCESS* to itself.  If an error occurs before
this binding takes place, the value of CCL:*CURRENT-PROCESS* will
be CCL:*INITIAL-PROCESS*.  (It's not supposed to be too easy for
an error to happen in that context, but I'm aware of this possibility
because I've run into it once or twice.)

One thing that you might try is

? (:y) 	; with no argument

If that quickly/quietly returns to a "? ", then that might tell us

More information about the Openmcl-devel mailing list