home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / mac / programm / 13991 < prev    next >
Encoding:
Internet Message Format  |  1992-08-14  |  2.2 KB

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