home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!convex!bcm!jstevens
- From: jstevens@crick.ssctr.bcm.tmc.edu (Jason Philip Stevens)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Creating background tasks (HELP!).
- Message-ID: <14078@gazette.bcm.tmc.edu>
- Date: 14 Aug 1992 15:21:17 GMT
- References: <1992Aug13.170029.3055@qiclab.scn.rain.com> <1992Aug13.200535.18236@sunfs3.Camex.COM>
- Sender: usenet@bcm.tmc.edu
- Reply-To: jstevens@crick.ssctr.bcm.tmc.edu (Jason Philip Stevens)
- Organization: Baylor College of Medicine, Houston, Tx
- Lines: 36
- Nntp-Posting-Host: crick.ssctr.bcm.tmc.edu
- Originator: jstevens@crick.ssctr.bcm.tmc.edu
-
-
- In article <1992Aug13.200535.18236@sunfs3.Camex.COM>, kent@sunfs3.Camex.COM (Kent Borg) writes:
- |> In article <1992Aug13.170029.3055@qiclab.scn.rain.com> baer@qiclab.scn.rain.com (Ken Baer) writes:
-
- |> >What I want to do is allow our 3D rendering software to render in the
- |> >background to the user can use the modeller etc. while rendering.
- |> >Could someone either post, or point me to some documented code to set
- |> >this up?
- |>
- |> Look in Inside Macintosh Volume VI or the new "Processes" volume of
- |> Inside Macintosh for details, but in general, there are two things to
- |> do:
- |>
- |> 1) When your code gets CPU time (you will know this because it is
- |> executing) do your thing.
- |>
- |> 2) When the user decides to say something to your running code--for
- |> example canceling the rendering he mistakenly started--notice the
- |> "Stop" menu choice, or "Cancel" button, or command-period keystroke,
- |> and act on it (by stopping in this case).
-
- Another option that may be more in line with what you really want to do
- is use threads. The new Threads package from apple allows programs to
- have multiple threads of execution. In your case, a single program (not
- seperate processes, as described above) could well shunt off all of the
- compute intensive rendering into a new thread, that would chug along while
- the user was free to interact with the rest of the program (which resides
- in its own thread).
-
- -jps
-
- --
- Jason Stevens Internet: jstevens@bcm.tmc.edu
- Network User Services Voice: (713) 798-7370
- Baylor College of Medicine Opinions expressed are mine alone.
-
-