Create a thread to be run in the background using Haxe and NME

Hello there.

I’m new to this world of Haxe and NME. I’m still struggling to understand the jargon but my requirement is to write a program in Haxe that can be run in the background without any user interface. I am also required to be able to port this program to all the platforms (Windows, Android and iOS).

Any help and/or pseudo code is really appreciated.

Hi! I apologize that it was so long to get a response.

No UI, so you want the user to not see your application running? This isn’t supported by Lime at the moment (although you can build command-line applications using Lime – the Lime tools are using Lime, for example)

Using a non-visual application is possible on Android, but the architecture is very different for an Android application that works this way. I don’t believe iOS allows completely background-only applications?

Oh okay, thanks for your input. Also, could you help me with retrieving cpu usage of a haxe program ? I am dynamically creating threads in my program and would like to know the cpu and memory usage of the respective threads/functions. Any ideas?

You can use hxscout to track the memory, but I don’t think you can track CPU use beyond using Task Manager or another OS program to track what resources your application is using