[haiku-development] Re: BMessenger and synchronous replies

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

Thanks Axel!

On 30 Apr 2010, at 8:08AM, Axel Dörfler wrote:

Chris Peel <chris.gsi@xxxxxxxxxxxx> wrote:
My question is - how does the reply message _actually_ get back to
BMessenger->SendMessage()?  Is it:

(a) by copying memory between processes

Generally, messaging works using ports. A BMessenger combines the target
port, plus its team as well as a target token that identifies a
specific handler.
The synchronous reply mechanism just uses one of a cached list of reply
ports that are only used for this case. See src/kits/app/Message.cpp
line 2177ff.

While messaging uses ports (and with them, memory copies between
processes), the actual data might be sent using an area after some
threshold is reached (IIRC 64K).


Other related posts: