Stuart: That sounds like it could work, however, pointed out by someone else - I think NSFileHandle's readToEndOfFileInBackgroundAndNotify could work better as I am dealing with reading files.
On 4/4/09 8:45 PM, "Stuart Malin" <stu...@zhameesha.com> wrote: > > On Apr 4, 2009, at 5:36 PM, Pierce Freeman wrote: > >>> And, if you are 10.5 only, there's also NSObject's >>> performSelectorInBackground:withObject: >> >> Is this a timer or a thread creator? I don't believe it has inputs >> for the >> time, or could it just do it automatically? Also, is there some way >> I can >> make this work with a function already created? > > That is a thread creator. It will initiate the specified selector of > the receiver (the invoked object). You can pass a single object to it; > that object can, of course, contain references to other objects. > > Please be careful to distinguish "method" from "function." If you > meant an Objective-C method, yes, it will work with that. If you meant > a C function, then no, it will not work, at least not directly, but in > such case it would be easy to create a method that called the function. > > Note: as has already been pointed out, you must be very careful > regarding thread safety. A background thread task must carefully > constrain which objects it instantiates and methods used to those that > are thread safe. Certainly no U/I. > > Read the cited references, and additional material germane to these. > > btw: by any stretch of the imagination, I'm not an expert with threads. > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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/archive%40mail-archive.com This email sent to arch...@mail-archive.com