• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Asynchronous Distributed Object Calls
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Asynchronous Distributed Object Calls (From: Adam Thorsen <email@hidden>)

  • Prev by Date: Re: Asynchronous Distributed Object Calls
  • Next by Date: Re: self = [super init] debate.
  • Previous by thread: Re: Asynchronous Distributed Object Calls
  • Next by thread: NSOutlineView with NSTreeController bindings - default expansion for nodes
  • Index(es):
    • Date
    • Thread