Re: NSPipe (NSFileHandle) writedata limit?
Re: NSPipe (NSFileHandle) writedata limit?
- Subject: Re: NSPipe (NSFileHandle) writedata limit?
- From: "McLaughlin, Michael P." <email@hidden>
- Date: Mon, 12 Apr 2010 13:56:13 -0400
- Acceptlanguage: en-US
- Thread-topic: NSPipe (NSFileHandle) writedata limit?
>Greg Guerin wrote
>The fundamental design is "send all data before looking for any
>results". This is inherently synchronous, even though two or more
>processes are involved. If the subtask is designed to "read all data
>before producting any results", then it shouldn't deadlock. However,
>if the subtask is designed to "read some data, produce some results",
>then it is prone to deadlock.
In my app so far, I have not even gotten to the point where the subtask
produces any output. I am sending all data from main but main blocks iff
the number of bytes sent > 65536.
As noted in my previous posting, the subtask consumes this stream via
-(NSData*)getDataSz:(NSUInteger)sz
{
return [input readDataOfLength:sz]; // where input = stdin
}
The only allusion to the number 65536 that I found was via sysctl which
reveals the following buffer size:
net.inet.tcp.sendspace = net.inet.tcp.recvspace = 65536
but I am not certain that this is relevant.
--
Mike McLaughlin
_______________________________________________
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