Recent days I’m test how to export console app, I’m trying to hangup main loop and put all patches into another thread by using AsyncLoop. Doesn’t know if this is a good idea, any suggestions?
Do I understand you correctly that you simply want to have a main loop running like in the non-console case? It’s not really about the background thread, is it?
The lifetime of exported apps is controlled via a ref counting mechanism. Here’s a much cleaner approach making use of it trough a node called KeepAppAlive you find inside the document.