Re: [resolved] Re: really weird move file problem -- bonus points to Jon Hendry
Re: [resolved] Re: really weird move file problem -- bonus points to Jon Hendry
- Subject: Re: [resolved] Re: really weird move file problem -- bonus points to Jon Hendry
- From: Jaime Magiera <email@hidden>
- Date: Mon, 24 Sep 2007 19:07:14 -0400
On Sep 24, 2007, at 6:10 PM, Alastair Houghton wrote:
A better solution might be to explicitly send -closeFile to the
NSFileHandle once you're finished with it... this also has the
merit that it will work under garbage collection, no matter how
long the collector decides to wait between collections.
Hi,
Actually, I did/do. The method uses update for certain parts, then a
closeFile at the end. For some reason, the closeFile takes longer
than the method returning to its caller. It seems to be based on the
amount of bytes written in a particular cycle. For example, when I
would comment out a part of the method which writes several dozen
TIFF images to the handle before the closeFile, it copied over fine.
However, if I un-comment that section, the error returns. So,it seems
I need to call update more often, or add a delay before the copy. I'm
curious about two things...
- Why did my method return before [NSFileHandle closeFile] finishes?
Would control remain in the call until it returns?
- What is the caching limit of an NSFileHandle? I would think it
would be gigabytes. So, why would adding a few TIFF images take such
a long time to close/update?
interesting,
Jaime Magiera
Sensory Research Network
http://www.sensoryresearch.net
_______________________________________________
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