Merge "Revert "Improve the thread flip.""
am: bf042503dc

Change-Id: I12000152e9c2752b64d75297328f9521bb26b56a