     // Grand Central Dispatch (GCD) usage
     let myQueue = DispatchQueue(label: "myQueue", attributes: DispatchQueue.Attributes.concurrent)
     let myGroup = DispatchGroup()
-    var isVisible = false
+    lazy var isAppeared: Bool = false
     
     @IBOutlet weak var progressButton: UIButton!
     @IBOutlet weak var goButton: UIButton!

        }
    }

    func openCountingThread() {
        let myThread = Thread(target: self, selector: #selector(ConcurrencyViewController.countForever), object: nil)
        myThread.start()  // Actually creates the thread
    }

    func openCountingThread2() {
        Thread(target: self, selector: #selector(ConcurrencyViewController.countForever), object: nil).start()
    }
    
    func openCountingThread3() {
        Thread.detachNewThreadSelector(#selector(ConcurrencyViewController.countForever), toTarget: self, with: nil)
    }
    
    func countForever() {
        var time = 0
        while self.isVisible {
            Thread.sleep(forTimeInterval: 1)
            time += 1
            📘("counting \(time)")
        }
    }
    

            📘("action 2 dispatched")
            self?.action3Spinner.stopAnimating()
        }
    }

    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)

        resetProgressBars()
        isAppeared = true
    }

    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)

        openCountingThread_3()
    }

    override func viewDidDisappear(_ animated: Bool) {
        super.viewDidDisappear(animated)
        
        isAppeared = false
    }

    @IBAction func btnStartProgressPressed(_ sender: UIButton) {
