home *** CD-ROM | disk | FTP | other *** search
- Organization: School of Computer Science, Carnegie Mellon, Pittsburgh, PA
- 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+
- Newsgroups: comp.soft-sys.andrew
- Message-ID: <cf2LG5O00Wo557vEoe@andrew.cmu.edu>
- Date: Tue, 17 Nov 1992 17:39:01 -0500
- From: Robert Andrew Ryan <rr2b+@andrew.cmu.edu>
- Subject: Re: message queue with ATK
- In-Reply-To: <1992Nov17.163509.662@csi.uottawa.ca>
- References: <1992Nov17.163509.662@csi.uottawa.ca>
- Lines: 36
-
- Excerpts from netnews.comp.soft-sys.andrew: 17-Nov-92 message queue with
- ATK Isabelle Tourneux@shamin (691)
-
- > - is it possible to use the usual msgrcv and msgsnd in an
- > infinite loop ? I have tried to put an infinite loop in the
- > "controller_go" of an Adew view-controller, but it disturbs the
- > usual functionnning of the controller.
-
- Yes, the normal function of an interactive ATK function assumes that the
- event loop in im/xim is run whenever waiting for input. You could peek
- into the internals of im and xim, and add the appropriate select call
- and then call im_Interact(FALSE) if there is input for im. I'm not very
- familiar with message queues, as far as I can tell the only way to know
- when a message has arrived is to be waiting for it, or to poll
- continually.
-
- Excerpts from netnews.comp.soft-sys.andrew: 17-Nov-92 message queue with
- ATK Isabelle Tourneux@shamin (691)
-
-
- > - does an object-oriented function (a sort of "im_AddMessageQueue")
- > exist to set an input handler when something arrives on a
- > message queue, just as it does for sockets in im_AddFileHandler ?
-
- No. Adding such a function might be quite difficult. You could use
- im_EnqueueEvent to periodically poll a message queue, but this could
- hurt performance substantially.
-
- In an environment without threads I don't see how message queues make
- sense to use. (Though some of their features are certianly useful.)
-
- If the main feature you're looking for is access control via the
- permission bits, then a unix domain socket, or fifo might be better than
- message queues for use with ATK.
-
- -Rob
-