198 lines
68 KiB
Plaintext
198 lines
68 KiB
Plaintext
Copyright (c) 1986 Xerox Corporation. All rights reserved.
|
||
|
||
2
|
||
|
||
23.9 Non-Process Compatibility
|
||
1
|
||
|
||
This section describes some considerations for authors of programs that ran in the old single-process Interlisp-D environment, and now want to make sure they run properly in the Multi-processing world. The biggest problem to watch out for is code that runs underneath the mouse handler. Writers of mouse handler functions should remember that in the process world the mouse handler runs in its own process, and hence (a) you cannot depend on finding information on the stack (stash it in the window instead), and (b) while your function is running, the mouse is not available (if you have any non-trivial computation to do, spawn a process to do it, notify one of your existing processes to do it, or use PROCESS.EVAL to run it under some other process).
|
||
The following functions are meaningful even if the process world is not on: BLOCK (invokes the system background routine, which includes handling the mouse); TTY.PROCESS, THIS.PROCESS (both return NIL); and TTY.PROCESSP (returns T, i.e., anyone is allowed to take tty input). In addition, the following two functions exist in both worlds:
|
||
(EVAL.AS.PROCESS FORM) [Function]
|
||
1
|
||
|
||
Same as (ADD.PROCESS FORM 'RESTARTABLE 'NO), when processes are running, EVAL when not. This is highly recommended for mouse functions that perform any non-trivial activity.
|
||
1
|
||
|
||
(EVAL.IN.TTY.PROCESS FORM WAITFORRESULT) [Function]
|
||
1
|
||
|
||
Same as (PROCESS.EVAL (TTY.PROCESS) FORM WAITFORRESULT), when processes are running, EVAL when not.
|
||
1
|
||
|
||
Most of the process functions that do not take a process argument can be called even if processes aren't running. ADD.PROCESS creates, but does not run, a new process (it runs when PROCESSWORLD is called).
|
||
|