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

Commit f10f941c authored by Jared Duke's avatar Jared Duke
Browse files

Use double-checked locking in (Java) Singleton type

Avoid unnecessary locks in the common case where the singleton has
been initialized. This is achieved through double-checked locking
with the volatile instance member.

Bug: 411249866
Test: atest FrameworksCoreTests
Flag: EXEMPT basic performance bugfix
Change-Id: I89b60ab6b6fd72eb598f5bfa9d3081a78bc10889
parent c58ffb98
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