Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!ames!husc6!lloyd!kent From: kent@lloyd.camex.uucp (Kent Borg) Newsgroups: comp.sys.mac.programmer Subject: Re: what the heck is "reentrant"? Keywords: reentrant Message-ID: <105@lloyd.camex.uucp> Date: 1 Aug 88 22:01:29 GMT References: <730049@hpcilzb.HP.COM> Reply-To: kent@lloyd.UUCP (Kent Borg) Organization: Camex, Inc., Boston, Mass USA Lines: 25 Reentrant means the code can be reentered. In other words, if a subroutine is reentrant, then many different programs can use the subroutine (function, procedure, etc.) at the same time without interfering with each other. The main concern is that variables from one instance of the routine does not interfear with another instance. Because there is no preemptive multitasking in the Mac, programs don't have to worry about other applications running behind their backs. But they DO have to wonder whether some evil VBI task is doing things it shouldn't, they have to coexist with desk accesories, and other applications that might be running under MultiFinder. There is another concrete reentrancy concern in the current Macintosh community: There could be an application on an AppleShare volume that is accessed by several Macintoshes. For this to work, AppleShare must allow it (I think there is a bit somewhere...), and the application must be reentrant. For example, temporary data must be distinct: if you choose Undo, someone else's text should not appear in your document. The application also should not modify any of it's resources, for example, preferences should be stored in separate file, with a name/location that will not interfere with other user's instances. Kent Borg kent@lloyd.uucp or husc6!lloyd!kent