startSync: run message loop in the current thread