Re: Receiver type for instance message is a forward declaration
Re: Receiver type for instance message is a forward declaration
- Subject: Re: Receiver type for instance message is a forward declaration
- From: Quincey Morris <email@hidden>
- Date: Fri, 06 May 2016 16:08:06 -0700
- Feedback-id: 167118m:167118agrif8a:167118sbz7l15ghZ:SMTPCORP
On May 6, 2016, at 14:58 , Alex Zavatone <email@hidden> wrote:
>
> Can we come up with a suitable set of tests to replicate and verify this
This was the code from the forum thread that I played around with:
> class ViewController: UIViewController {
> let backgroundQueue = dispatch_queue_create("backgroundQueue", DISPATCH_QUEUE_SERIAL);
> var tickTimer: NSTimer?
>
> var cancelTimer: NSTimer?
>
> override func viewDidLoad() {
> super.viewDidLoad()
>
> tickTimer = NSTimer.scheduledTimerWithTimeInterval(0.1, target: self, selector: "timerFired:", userInfo: nil, repeats: true)
>
> cancelTimer = NSTimer.scheduledTimerWithTimeInterval(30, target: self, selector: "cancelTimerFired:", userInfo: nil, repeats: false)
> }
>
> func timerFired(timer: NSTimer) {
> for _ in 0..<100 {
>
> dispatch_async(backgroundQueue, { () -> Void in
> // TODO: some calculation. However, it does not matter
> })
> }
> }
>
> func cancelTimerFired(timer: NSTimer) {
> tickTimer?.invalidate()
> }
> }
But it only be a problem with specific OS X or iOS versions. I haven’t checked lately.
_______________________________________________
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