FileManager: Editor: Fix race on completion wait/notify
The async reader is racing with the completion handler and when reading a small enough file the notification may happen before the handler ever waits. This patch adds a condition flag under the mSync lock and only ever waits if the completion wasn't done already. This also fixes a potential spurious wakeup issue with the previous code where the wait thread could be woken by a spurious wakeup without the read being completed. RM-290 Change-Id: Ie3e6ead942c0f00dbb3e44591be19634706ee206 Ticket: FEIJAO-1558
Loading
Please register or sign in to comment