i have task that must update my data every 5 secon...
# tornadofx
r
i have task that must update my data every 5 seconds. My current implementation
Copy code
runAsync {
         while (true) {
             TimeUnit.SECONDS.sleep(2)
             homeController.updateDeviceStatus(printers, notificationEnabled)
             homeController.updatePrintingServiceStatus(printers)
             homeController.runPrinterService(printers)
        }
}
but when i closed app it task still work