When AutoCAD is running without fibers, it has only one native code stack at its disposal in its main thread. A number of changes are necessary to the perform the same control transitions made by fiber switching.
The structural control flow changes are as follows:
acedCmd()functionality of switching stacks is no longer available (
$FIBERWORLDis 0; both return
RTERROR), new functions are provided to allow one to transfer control by pushing more native code onto the stack (subroutine style:
acedCmdS()) or by returning off the call stack after queueing a message to the logic that will then be executed (coroutine style:
(command)function is still supported by using
acedCommandC(). It causes LISP to save its relevant native call stack state in heap-based structures and return to AutoCAD to allow token processing; it is then re-invoked and its native call stack restored. For the main body of LISP applications, there should be no apparent difference in behavior. However,
*error*function overrides can no longer use
(command)due to internal limitations in the involved support logic. In most cases, the best alternative will be to convert such uses of
(command-s)is a new function introduced as part of the migration path. It requires that token sequences represent complete commands (from start to finish) and does not currently support any user interaction; it runs entirely on the command processor tokens supplied to it.
(command-s)usage is recommended even where not required, as it is significantly faster than a comparable call to
(command). It is possible to use
*error*if absolutely necessary, but it is complicated and not at all recommended.
AcApDocManager::isApplicationContext, but the application context is now “switched to” by “returning out of” the document context logic.
false; the system completes such actions after control returns to the application context.