Re: Asynchronous Distributed Object Calls
Re: Asynchronous Distributed Object Calls
- Subject: Re: Asynchronous Distributed Object Calls
- From: Jens Alfke <email@hidden>
- Date: Sun, 10 Feb 2008 13:51:00 -0800
On 10 Feb '08, at 12:15 PM, Adam Thorsen wrote:
Is there a limit to the number of oneway calls to a DO instance
before it starts blocking? I've noticed that if I make about 6
async requests (none of which are completed by the time the last
call is made) the seventh call blocks in the caller.
IIRC, this is because the Mach message queue used by DO has a limited
fixed size. To avoid overflowing the queue, it blocks until there's
room.
We ran into this problem while implementing the first version of the
iChatAgent; it could get stuck this way and hang if a client process
also hung. I call this kind of spreading system freeze a "tar-baby".
At the time, I believe the engineer who fixed the bug ended up having
to implement a background thread pool for dispatching asynchronous DO
messages. If no threads were ready to send another message, it would
just create a new one.
(My personal opinion is that DO is kind of dangerous — an "attractive
nuisance" in legalese. It gives the impression of making everything
really easy, but there are nasty details like this that complicate
things. I also kept running into strange and nasty ref-counting
crashers that I was somehow never quite smart enough to figure out how
to fix. But maybe that's just me.)
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden