Email list hosting service & mailing list manager

Minor Correction? Mark K. Gardner (14 Apr 2000 16:45 UTC)
Re: Minor Correction? Dave Mason (14 Apr 2000 16:56 UTC)
Re: Minor Correction? Marc Feeley (15 Apr 2000 02:59 UTC)

Re: Minor Correction? Marc Feeley 15 Apr 2000 02:59 UTC

> >>>>> On Fri, 14 Apr 2000 10:45:05 -0600, "Mark K. Gardner" <xxxxxx@asimov.lanl.gov> said:
>
> > Shouldn't the definition of thread-terminate! state that threads
> > which are not the current thread should terminate immediately?
>
> >> If thread is not running or it is the current thread, it is
> >>                                  ^not
> >> terminated immediately, otherwise the scheduler may wait until the
> >> thread blocks or is preempted before terminating it.
>
> Nope.  If a thread calls thread-terminate! then it can (and according
> to the spec, must) terminate immediately.  Likewise for not-running
> threads.  But running threads other than the caller of
> thread-terminate! may run until they block or are preempted.

I agree with Dave.  Note that this leaway for other threads is
purely to simplify implementation on multiprocessors.

Should I be more precise and specify that the primitive
thread-terminate! does not wait until the thread has been terminated
before returning?  Note that a program can force to wait for thread
termination by following the call to thread-terminate! with a call to
thread-join! with appropriate exception handling.

Marc