Thread View: comp.soft-sys.andrew
4 messages
4 total messages
Started by Isabelle Tourneux
Tue, 17 Nov 1992 16:35
message queue with ATK
Author: Isabelle Tourneux
Date: Tue, 17 Nov 1992 16:35
Date: Tue, 17 Nov 1992 16:35
20 lines
1257 bytes
1257 bytes
I would like to use message queues with ATK and ADEW. - 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. - 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 ? In short, is there a way I can use message queues, or can I use only sockets to communicate with other processes ? Thanks Isabelle Tourneux Multimedia Lab of the University of Ottawa, isabelle@shamin.genie.uottawa.ca
Re: message queue with ATK
Author: Robert Andrew Ryan
Date: Tue, 17 Nov 1992 22:39
Date: Tue, 17 Nov 1992 22:39
36 lines
2159 bytes
2159 bytes
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
Re: message queue with ATK
Author: Zalman Stern
Date: Tue, 17 Nov 1992 23:46
Date: Tue, 17 Nov 1992 23:46
34 lines
2023 bytes
2023 bytes
In article <1992Nov17.163509.662@csi.uottawa.ca> isabelle@shamin.genie.uottawa.ca (Isabelle Tourneux) writes: > > I would like to use message queues with ATK and ADEW. > > - 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. > > - 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 ? > > In short, is there a way I can use message queues, or can I use > only sockets to communicate with other processes ? > > Thanks > > Isabelle Tourneux > Multimedia Lab of the University of Ottawa, > isabelle@shamin.genie.uottawa.ca The namespace for System V message queues is disjoint from the file descriptor namespace. They do not work with select and hence do not fit into ATK interaction model. In short the SysV message and shared memory interfaces are evil crud which never should have been implemented in a UNIX kernel. Use the BSD send and recv calls instead. Or if you have SysVr4, you might try putmsg and getmsg on streams but I'm not sure how that stuff interacts with select. (And it undoubtedly depends on the particular version of UNIX you are running.) -- Zalman Stern zalman@adobe.com (415) 962 3824 Adobe Systems, 1585 Charleston Rd., POB 7900, Mountain View, CA 94039-7900 "Yeah. Ask 'em if they'll upgrade my shifters too." Bill Watterson
Re: message queue with ATK
Author: Guy Harris
Date: Wed, 18 Nov 1992 01:23
Date: Wed, 18 Nov 1992 01:23
12 lines
990 bytes
990 bytes
>Or if you have SysVr4, you might try putmsg and getmsg on streams On what *kind* of streams? (I.e., STREAMS is a general framework; to do IPC on top of it, you need some particular thing that plugs into that framework. There's probably something in SVR4 that'll do....) >but I'm not sure how that stuff interacts with select. "select()", in SVR4, is implemented atop "poll()", so anything that supports "poll()" - which should include anything implemented atop STREAMS - should work with "select()", modulo bugs in the "select()" implementation.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads