My question here specific to AIR apps for desktop, not for the web. I have Flex 4.6 and AIR 3.5. I've beed Googling for days with no joy.
There are no code errors but does anyone know where and how to initialize workers in the main mxml file or hat appliaction handler should be used to get the worker thread to set the mainToWorker and workerToMain MessageChannel's, as there is no class initializer like there is in web flex projects.
worker = WorkerDomain.current.createWorker(this.loaderInfo.bytes);
mainToWorker = Worker.current.createMessageChannel(worker);
workerToMain = worker.createMessageChannel(Worker.current);
// if in worker thread
mainToWorker = Worker.current.getSharedProperty("mainToWorker");
workerToMain = Worker.current.getSharedProperty("workerToMain");