Re: NSPipe (NSFileHandle) writedata limit?
Re: NSPipe (NSFileHandle) writedata limit?
- Subject: Re: NSPipe (NSFileHandle) writedata limit?
- From: Marcel Weiher <email@hidden>
- Date: Mon, 12 Apr 2010 09:47:03 -0700
On Apr 9, 2010, at 10:35 , McLaughlin, Michael P. wrote:
> My main thread has an NSArray of Subtasks and sends data to each via
>
> Npending = numProcessors;
> for (k = 0;k < numProcessors;k++) {
> Subtask *aTask = [myTask objectAtIndex:k];
> [aTask sendData:&theData numBytes:sz taskTag:@"aTag"];
> }
Just a quick note that the "&data" looks fishy to me. Unless theData is declared as <type> theData[<size>] this will send the pointer + random data behind it down the pipe, and if it is declared that way the & is redundant.
Marcel
_______________________________________________
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