Thanks Ryan. I'll keep "svn up" ready!
-Angus >>> "Ryan O'Hara" <[email protected]> 03/27/09 4:25 PM >>> On Fri, Mar 27, 2009 at 02:33:19PM +1300, angus salkeld wrote: > Hi all > > I wanted to > > result = saMsgQueueOpen (handle, > &queue_name, > &creation_attributes, > SA_MSG_QUEUE_CREATE | SA_MSG_QUEUE_RECEIVE_CALLBACK, > SA_TIME_END, > &queue_handle); > > and then rely on the callback to tell me when I had a new message. > > But SA_MSG_QUEUE_RECEIVE_CALLBACK looks like it is not implemented. > Is this not a very common usage? How else are you supposed to know when > there are messages in your queue? Yes, that is correct -- that callback is not yet implemented. I'm working on it and will have a huge patch ready to submit in the next few days. > Attached are two test c files (and a make patch) of what I am trying > to do (note they are hacks of Steve's testmsg.c). > > Basically I want to send a message to a queue from one process and get it > delivered > to another process. > > in one shell: > ./test/msgprint > > > in another: > ./test/msgsend > > Any ideas of how else I can do this with the current saMsg? In short, you can't. You should be able to send messages to a queue and you should be able to get messages from a queue, but there are two things that are missing form the current code base that prevent you from doing this sort of thing easily. First, as you pointed out, the callback to inform you that a message has arrived in a queue in not yet implemented. The alternative is to call saMsgMessageGet on a queue and wait for messages to arrive. However, the code in svn will not block on an emtpy queue, so this doesn't work. This is working in my development tree. Stay tuned. _______________________________________________ Openais mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/openais
