XEROX TEDIT-PROCESS-KILLER 2 4 1 TEdit-Process-Killer 1 4 By: Steve Bagley (Bagley.pa) and Randy Trigg (Trigg.pa) This document last edited on Apr 23, 1987 INTRODUCTION TEDIT-PROCESS-KILLER provides a simple interface to removing and restoring the process of a TEdit window. The processes of TEdit windows can be killed selectively or a TEDIT-KILLER process can be started to keep the total number of active TEdit processes at or near some threshold level. TEdit processes are automatically rebuilt when you button in their windows. INTERFACE (KILL-PROCESS-OF-TEDIT-WINDOW WINDOW) [Function] kills the processes associated with the main window of WINDOW, and all of the attached windows. Each process is killed in such a way that the TEdit can be restarted. It is not an error to call this function on a TEdit whose process has already been killed. (WITHOUT-TEDIT-PROCESS WINDOW) [Function] returns T if this window does not have a process, because the process was killed by KILL-PROCESS-OF-TEDIT-WINDOW, NIL otherwise. (RESTART-PROCESS-OF-TEDIT-WINDOW WINDOW) [Function] restarts the TEdit processes for the main window of WINDOW and all attached windows if the processes have been killed by KILL-PROCESS-OF-TEDIT-WINDOW. (START-TEDIT-KILLER) [Function] starts up a process called TEDIT-KILLER which wakes up at regular intervals to kill off the least recently used TEdit processes. There are two global vars available to the user to affect its operation: TEDIT-PROCESS-LIMIT [Variable] Defaults to 10. The preferred threshold of running TEdit processes. Every time TEDIT-KILLER wakes up, it kills off enough TEdit processes to bring the total down to this limit. TEDIT-KILLER-WAIT-TIME [Variable] Defaults to 10000. The time in milliseconds between wake-ups of TEDIT-KILLER. (STOP-TEDIT-KILLER) [Function] kills any running TEDIT-KILLER process. NOTES In order to force a TEdit to be killed off when shrunk, simply do (WINDOWADDPROP 'SHRINKFN (FUNCTION KILL-PROCESS-OF-TEDIT-WINDOW)) and, if you like, (WINDOWADDPROP 'EXPANDFN (FUNCTION RESTART-PROCESS-OF-TEDIT-WINDOW)) BUGS We don't kill lafite sendmessage processes. (LIST ((PAGE NIL (FOLIOINFO (ARABIC) STARTINGPAGE# 1) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL NIL (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM)) (282 42 72 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL NIL (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM)) (282 42 72 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))))).ÈÈ.ÈÈ(È(ŠŠ8(ŠŠ8DÈÈ PAGEHEADING RUNNINGHEAD  TIMESROMAN TERMINAL  HELVETICA MODERN MODERN MODERN MODERNMODERN LOGO  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN 9* j    Y  ~ Ë ³ O (B.1,hœzº