Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Unverified Commit e0da075d authored by Diogo Ferreira's avatar Diogo Ferreira Committed by Adrian DC
Browse files

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
parent 7a237109
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment