home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / softsys / andrew / 1386 < prev    next >
Encoding:
Text File  |  1992-11-17  |  2.1 KB  |  48 lines

  1. Organization: School of Computer Science, Carnegie Mellon, Pittsburgh, PA
  2. Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!rr2b+
  3. Newsgroups: comp.soft-sys.andrew
  4. Message-ID: <cf2LG5O00Wo557vEoe@andrew.cmu.edu>
  5. Date: Tue, 17 Nov 1992 17:39:01 -0500 
  6. From: Robert Andrew Ryan <rr2b+@andrew.cmu.edu>
  7. Subject: Re: message queue with ATK
  8. In-Reply-To: <1992Nov17.163509.662@csi.uottawa.ca>
  9. References: <1992Nov17.163509.662@csi.uottawa.ca>
  10. Lines: 36
  11.  
  12. Excerpts from netnews.comp.soft-sys.andrew: 17-Nov-92 message queue with
  13. ATK Isabelle Tourneux@shamin (691)
  14.  
  15. > - is it possible to use the usual msgrcv and msgsnd in an
  16. > infinite loop ? I have tried to put an infinite loop in the
  17. > "controller_go" of an Adew view-controller, but it disturbs the
  18. > usual functionnning of the controller.
  19.  
  20. Yes, the normal function of an interactive ATK function assumes that the
  21. event loop in im/xim is run whenever waiting for input.  You could peek
  22. into the internals of im and xim, and add the appropriate select call
  23. and then call im_Interact(FALSE) if there is input for im.  I'm not very
  24. familiar with message queues, as far as I can tell the only way to know
  25. when a message has arrived is to be waiting for it, or to poll
  26. continually.
  27.  
  28. Excerpts from netnews.comp.soft-sys.andrew: 17-Nov-92 message queue with
  29. ATK Isabelle Tourneux@shamin (691)
  30.  
  31.  
  32. > - does an object-oriented function (a sort of "im_AddMessageQueue")
  33. > exist to set an input handler when something arrives on a
  34. > message queue, just as it does for sockets in im_AddFileHandler ?
  35.  
  36. No.  Adding such a function might be quite difficult.  You could use
  37. im_EnqueueEvent to periodically poll a message queue, but this could
  38. hurt performance substantially.  
  39.  
  40. In an environment without threads I don't see how message queues make
  41. sense to use.  (Though some of their features are certianly useful.)
  42.  
  43. If the main feature you're looking for is access control via the
  44. permission bits, then a unix domain socket, or fifo might be better than
  45. message queues for use with ATK.
  46.  
  47. -Rob
  48.