Using awThreadedCallbacks
In a multi-threaded environment, the awThreadedCallbacks function will spawn a thread that then invokes awMainLoop. This function simplifies your client application code by handling the thread creation for you.
Invoking awThreadedCallbacks(1) is identical to creating a thread and then invoking the awMainLoop method on that thread.
Invoking awThreadedCallbacks(0) is identical to invoking the awStopMainLoop method.