Informs LispWorks that there are probably not going to be more callbacks from foreign code on the current thread, allowing it to free some data.
The function
last-callback-on-thread
informs LispWorks that there are probably not going to be more callbacks from foreign code on the current thread (but does not guarantee this).
last-callback-on-thread
must be used in the scope of a call into LispWorks by a foreign callable on a thread that was not created by LispWorks. It informs LispWorks that there are unlikely to be more callbacks into Lisp on the current thread. As a result, LispWorks can cleanup its side.
For each thread that was not created by Lisp and on which there was a call into Lisp, LispWorks keeps data on the Lisp side which it uses to make the entry faster. If the thread goes away, this data is not needed and so LispWorks can free it.
If another callback occurs on the same thread after a callback that called
last-callback-on-thread
, LispWorks will have to recreate its side, which takes a little more time, but otherwise it works in the same way. Thus it is possible to call
last-callback-on-thread
even when it is not guaranteed that there will not be further callbacks on the same thread.
Calling
last-callback-on-thread
on a thread that was created by LispWorks has no effect.
last-callback-on-thread
returns
t
when called on a thread that was not created by LispWorks, otherwise it returns
nil
.
LispWorks User Guide and Reference Manual - 21 Dec 2011