• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Beachball on Lengthy Task
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Beachball on Lengthy Task


  • Subject: Re: Beachball on Lengthy Task
  • From: Pierce Freeman <email@hidden>
  • Date: Sun, 05 Apr 2009 11:18:14 -0700
  • Thread-topic: Beachball on Lengthy Task

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" <email@hidden> 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 (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

References: 
 >Re: Beachball on Lengthy Task (From: Stuart Malin <email@hidden>)

  • Prev by Date: Re: IB Plugin help
  • Next by Date: Re: Beachball on Lengthy Task
  • Previous by thread: Re: Beachball on Lengthy Task
  • Next by thread: RE:Beachball on Lengthy Task
  • Index(es):
    • Date
    • Thread