[haiku-development] BMessenger and synchronous replies

  • From: Chris Peel <chris.gsi@xxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 30 Apr 2010 07:15:33 +0100


Hello

I'm interested in the internal workings of the Haiku messaging system, specifically how Haiku handles synchronous replies across process boundaries. Take the following scenario:

1. Within my application, I create a new BMessenger and point it to some arbitrary remote process (that will accept messages)
2. I then call SendMessage(), providing a reply BMessage

My question is - how does the reply message _actually_ get back to BMessenger->SendMessage()? Is it:

(a) by copying memory between processes
or
(b) dropping the reply message into my application's BLooper (i.e. using the normal messaging system)

The source code for BMessage and BMessenger seems to imply (a) but if it's (b) then how does the remote app 'know' who the BMessenger belongs to?

Thanks in advance

Chris



Other related posts: