FROM : Jens Alfke
DATE : Sun Feb 10 22:51:00 2008
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_removed>)
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:
http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
This email sent to <email_removed>
DATE : Sun Feb 10 22:51:00 2008
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_removed>)
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:
http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
This email sent to <email_removed>
| Related mails | Author | Date |
|---|---|---|
| Adam Thorsen | Feb 10, 21:15 | |
| Julien Jalon | Feb 10, 22:46 | |
| Jens Alfke | Feb 10, 22:51 |






Cocoa mail archive

