• 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: Passing arguments to threads?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing arguments to threads?


  • Subject: Re: Passing arguments to threads?
  • From: Nicko van Someren <email@hidden>
  • Date: Thu, 18 Nov 2004 16:44:14 +0000

On 18 Nov 2004, at 16:35, Damien Bobillot wrote:
...
Yes with the NSThread class method :
+ (void)detachNewThreadSelector:(SEL)aSelector toTarget:(id)aTarget withObject:(id)anArgument


there's only one argument, but you may given an NSArray, NSDictionary, C structure, any Objective-C object…
^^^^^^^^^^
Passing a C structure is not a good idea with the this call since the method will try to send a retain message to the argument before the detach call returns and a release message when the thread completes.


	Nicko

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Passing arguments to threads? (From: Dan Saul <email@hidden>)
 >Re: Passing arguments to threads? (From: Damien Bobillot <email@hidden>)

  • Prev by Date: Re: Suggestions for App design
  • Next by Date: Re: Suggestions for App design
  • Previous by thread: Re: Passing arguments to threads?
  • Next by thread: CFPreferences calls in Cocoa apps
  • Index(es):
    • Date
    • Thread