A function designator.
A non-negative real number specifying a time in seconds.
calls co-initialize and start-factories, and then processes messages, until the server can exit. Since COM works by messages, it will end up processing all COM requests.
determines when the server can exit. It defaults to server-can-exit-p, which is normally the right function. This returns
when the COM server is not used and there are no other "working processes". See the documentation for server-can-exit-p. When
is supplied, it needs to be a function of no arguments which returns true when the server can exit. The
is used like a wait function: it is called repeatedly, it needs to be reasonably fast, and should not wait for anything.
Once the server can exit,
delays exiting for another period of time,
defaults to 5, and can be set by calling set-automation-server-exit-delay. If supplied,
is passed to set-automation-server-exit-delay on entry. However, later calls to set-automation-server-exit-delay can change the
After the delay
checks again by calling
. If this returns false it goes on to process messages. Otherwise it stops the factories, calls co-uninitialize and returns.
automation-server-top-loopinteracts with the
:quit-when-no-windows, such that the delivered application does not
quiteven after all CAPI windows are closed as long as
automation-server-top-loophas not returned.
automation-server-top-loopdoes not return while the server is active. Typically it will be running on its own process.
mp:general-handle-eventto process Lisp events, so it is possible to run in the same thread operations that rely on such messages. In particular, CAPI windows can start on the same process. However, all COM input is processed in this thread, so it is probably better to start CAPI windows on other processes, so that they do not interfere with each other.
automation-server-top-loopdoes not return a useful value.
LispWorks COM/Automation User Guide and Reference Manual - 19 Dec 2011