Re: -[NSThread start] blocks ?!?
Re: -[NSThread start] blocks ?!?
- Subject: Re: -[NSThread start] blocks ?!?
- From: Quincey Morris <email@hidden>
- Date: Sat, 26 Sep 2015 15:53:35 -0700
- Feedback-id: 167118m:167118agrif8a:167118sYueBCLE3C:SMTPCORP
On Sep 26, 2015, at 15:33 , Jerry Krinock <email@hidden> wrote:
>
> Should not -[NSThread start] always return before running any of my code in the new thread?
You have absolutely no control over it, unless you introduce your own synchronization mechanisms.
The *earliest* it can return is before the new thread has had a chance to run initially. But the starter thread is competing for chances to run with every other thread on the system, so it can be delayed by any other thread, including the one it started, up to and beyond the point when the worker thread exits.
_______________________________________________
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