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

Skip to content
Commit 06e57b5d authored by Jozef BABJAK's avatar Jozef BABJAK
Browse files

Fixing possible race condition.

That return statement is effectively a reading of asynchronously modified
field. The reading and writing is elsewhere protected by locking on thread
instance, except this one occurence. Moving 'return' statement into
synchronized block ensures that it reads updated value.

Don't be afraid of deadlock - wait() releases the lock and acquires it
back when notified.

Change-Id: I940c24c04a1a2d4508d14d11b6174ff4fb2ab7d5
parent 056340ac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment