mss@dartvax.UUCP (Mark Sherman) (10/11/85)
People who are desparate for coroutines can have a copy of a Lisa Pascal Unit that I wrote which provides tasking and coroutines for Macintosh programs cross developed on the Lisa. Beware of two kludges. The first is that the task scheduler is nonpreemptive -- I based the design on the "light-weight tasking package" which exists in many flavors for various Xerox and IBM PC-like machines. You must call "yield" when a task is willing to relinquish control, sort of like "SystemTask" which everyone knows and loves. Second, as a compatibility measure with Pascal types, all coroutines and tasks must have a signature compatible with: FUNCTION MyTask(Input:PTR): PTR; The idea is that you can pass a pointer to whatever block of information you want. In fact, any 4-byte sized thing will do. You might pass/return a Longint, or pass a variable by refernece, and all the "right" things will happen. Unfortunately, I am still writing documentation and demo programs to illustrate the package -- all I have for now is my test pogram which tries out various calls in various ways. If there is sufficient interest, I'll post the Unit sources to the net.