[Ecls-list] Threads under Windows

Juan Jose Garcia Ripoll lisp at arrakis.es
Tue Feb 1 01:15:00 UTC 2005

Goffioul Michael wrote:

>Concerning threads, something I wonder is what happens if an error is
>generated in a thread other than the main thread. Is the error handler
>of debugger entered? Is it safe to do so?
Right now, with threads being created only by ECL, it is safe because 
there is a CL_CATCHALL_BEGIN statement enclosing the code that is being 
executed. The debugger will be invoked in the thread in which the error 
happened depending on whether you have set *break-enable* to true or not.

It is not yet clear to me whether this is good or bad. It might cause 
undesirable results if another toplevel is running, for instance. A 
solution that comes to my mind is to have a lock, such that whenever the 
debugger is invoked it waits for the lock to be release _after_ the 
error message is printed. A new toplevel command would allow the user to 
switch toplevels, releasing the lock for the offending thread to 
interact with the user.

What do you think?

A different problem is the issue of "importing" threads. That is, 
threads which have been created from the embedding program and want to 
run lisp code. Here I am having these issues:

    - We cannot set up a CATCHALL that takes all errors because ECL does 
not have a controlling toplevel loop

    - The garbage collector might have problems recognizing these 
threads under Windows, unless the user has created them with 



More information about the ecl-devel mailing list