I am using all this good advice to attempt to unwrap myself and the axle. I shall return.
-rags > On Jan 13, 2015, at 2:09 PM, Corbin Dunn <corb...@apple.com> wrote: > >> >> On Jan 13, 2015, at 9:57 AM, Mike Abdullah <mabdul...@karelia.com> wrote: >> >> >>> On 13 Jan 2015, at 16:18, Mike Abdullah <mabdul...@karelia.com> wrote: >>> >>> >>>> On 13 Jan 2015, at 16:07, Raglan T. Tiger <r...@crusaderrabbit.net> wrote: >>>> >>>> I allocate and init an NSThread as follows: >>>> >>>> if ( m_mythread ) [m_mythread cancel]; >>>> m_mythread = [[MYThread alloc] initWithTarget:m_mythread >>>> selector:@selector(start) object:m_anobject]; >>>> [m_mythread start]; >> >> Looking closer, I have to wonder what you think this code will do. You seem >> to be trying to create a thread that will message *itself* to do its work. > > Not only that, but I bet it infinite loops restarting itself. > > 1. Use init, not initWithTarget. > 2. Override -main to do your threaded work. > > corbin > > >> At the time this code is executed, m_mythread will either be nil, or will >> point to an older thread instance that you’re about to supersede. >> >> I think you need to take a step back and evaluate your app design. What are >> you actually trying to accomplish here? Would using NSOperationQueue or GCD >> better suit your needs? >> _______________________________________________ >> >> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com >> <mailto: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 >> <http://lists.apple.com/> >> >> Help/Unsubscribe/Update your Subscription: >> https://lists.apple.com/mailman/options/cocoa-dev/corbind%40apple.com >> <https://lists.apple.com/mailman/options/cocoa-dev/corbind%40apple.com> >> >> This email sent to corb...@apple.com <mailto:corb...@apple.com> > > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com > <mailto: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 > <http://lists.apple.com/> > > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/koko%40highrolls.net > <https://lists.apple.com/mailman/options/cocoa-dev/koko%40highrolls.net> > > This email sent to k...@highrolls.net <mailto:k...@highrolls.net> _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com