migrate in main thread.