09-28-2012 12:07 PM - edited 09-28-2012 12:21 PM
I have an application that runs another instance of itself. The second instance is a background app that does some work for the first app on demand by responding to global events, therefore the second app doesn't display a UI and doesn't call Application.enterEventDispatcher. By implementing GlobalEventListener, I can register to receive global events. The problem is, the second app does this and then immediately exits, because there's nothing keeping it from returning from the "main" method, like an Application.enterEventDispatcher call or anything else that blocks until exiting is desired. So I'd like to know if there's a way to not just receive global events, but actually wait for them (block). That way the first app could post an "exit" event when exiting is desired. Or if anybody has other suggestions as to how to block until the first app wants the second app to exit.
10-01-2012 04:55 AM