home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 7138 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: comma.rhein.de!serpens!not-for-mail
  2. From: mlelstv@serpens.rhein.de (Michael van Elst)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Messages vs. Semaphores for external clocking
  5. Date: 10 Apr 1996 11:20:43 +0200
  6. Organization: dis-
  7. Message-ID: <4kfuhb$ahh@serpens.rhein.de>
  8. References: <4ju349$r1e@sparky.navsea.navy.mil> <4jvrqs$hk0@btmpjg.god.bel.alcatel.be> <heinz.17rm@hwg.muc.de> <4kfmes$lle@btmpjg.god.bel.alcatel.be>
  9. NNTP-Posting-Host: serpens.rhein.de
  10.  
  11. barnhoorn@nlev00 () writes:
  12.  
  13. >.not so obviously. When you have two tasks, and one of them is
  14. >collecting data from some source, and the other one needs this data
  15. >with regular intervals, I don't see a more easier way to do this
  16. >then by using global data and disable/enable multitasking.
  17.  
  18. The trick is to disable multitasking only when necessary and only
  19. for the tasks that are involved.
  20.  
  21. >It is
  22. >a very multitasking-friendly solution,
  23.  
  24. No. You stop all other tasks (and with Disable() you even stop
  25. interrupts which is nonsense). With a semaphore you would stop
  26. only the other task. With message passing you wouldn't stop
  27. any task at all.
  28.  
  29. -- 
  30.                                 Michael van Elst
  31.  
  32. Internet: mlelstv@serpens.rhein.de
  33.                                 "A potential Snark may lurk in every tree."
  34.