home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / amiga / programm / 15530 < prev    next >
Encoding:
Internet Message Format  |  1992-11-08  |  2.1 KB

  1. Path: sparky!uunet!mcsun!sunic!chalmers.se!news.chalmers.se!dtek.chalmers.se!d9hh
  2. From: d9hh@dtek.chalmers.se (Henrik Harmsen)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: How to program multi-threaded programs on Amiga ?
  5. Message-ID: <d9hh.720829520@dtek.chalmers.se>
  6. Date: 3 Nov 92 22:25:20 GMT
  7. References: <d9hh.720658421@dtek.chalmers.se> <1992Nov3.192244.15235@jato.jpl.nasa.gov>
  8. Sender: news@news.chalmers.se
  9. Organization: Chalmers University of Technology, Gothenburg Sweden
  10. Lines: 38
  11. Nntp-Posting-Host: hacker.dtek.chalmers.se
  12.  
  13. jdickson@jato.jpl.nasa.gov (Jeff Dickson) writes:
  14.  
  15. >In article <d9hh.720658421@dtek.chalmers.se> d9hh@dtek.chalmers.se (Henrik Harmsen) writes:
  16. >>
  17. >>My particular problem is this: I need a process to run concurrently
  18. >>with the rest of the program to handle input from the OS. Then,
  19. >>when it has some input, it should put it on a buffer and signal
  20. >>it's arrival with some kind of semaphore so the consumer-process
  21. >>can go and collect it.
  22.  
  23. >When the OS (IDCMP) sends you a message it will append the message to
  24. >the message port (UserPort) and set the signal associated with it. To 
  25. >have a seperate process do this for you wouldn't be necessary. The arri-
  26. >val of these messages and the setting of the signal bit are asynchronous. 
  27.  
  28. >oThe reason I need this structure is that I want the program to
  29. >>be able to cope with a lot of messages from the OS (because
  30. >>I need to read mouse-positions all the time) and at the
  31. >>same time do some heavy work in the editor without having
  32. >>to collect messages all the time.
  33.  
  34. >The messages would collect by themselves. You wouldn't have to explicitly
  35. >do this. 
  36.  
  37. >jeff
  38.  
  39. Yes, I know, Intuition has a buffer for all the messages that it wants
  40. to send me, but when you have a humungous amount of messages this buffer
  41. quite easily overflows.
  42.  
  43. I also want to use more than one (two, three..) processes for other things.
  44. It would be nice to be able to edit one text while you process another :-)
  45.  
  46.  
  47. --
  48. Henrik Harmsen     Internet:  d9hh@dtek.chalmers.se
  49.                Chalmers University of Technology, Sweden. 
  50.       "I haven't lost my mind -- it's backed up on tape somewhere."
  51.