DESCRIPTION

Pending Verification: Widen Listener lock to avoid deadlock

Motivation
----------
Because of how the addListener and notifyListener works, it could be that
one deadlocks each other because they are waiting on the same locks from
different threads.

Modifications
-------------
The lock is widened to a method-wide synchronization to avoid potential
inner-method deadlocks.

Result
------
Since the lock is widened, there should be no inner deadlocks anymore.

Change-Id: I7ebda58c2eadd62d8885e3eeac79d5a971e07979


COMMENTS

author: Natasha Sullivan
date: 2014-04-23 14:57:43.164000000

Uploaded patch set 1.

-------------------------------------
author: Andreas Short
date: 2014-04-23 15:08:40.739000000

Patch Set 1: Code-Review+2

-------------------------------------
author: Andreas Short
date: 2014-04-23 15:09:21.493000000

Patch Set 1:

I'm sure like you I'd feel better with a test that demonstrates the fix in the situation encountered, but I don't see any harm here.

-------------------------------------
author: Natasha Sullivan
date: 2014-04-23 15:15:58.673000000

Patch Set 1:

definitely. I tried to reproduce it some time ago when it was reported on google code, but no luck. That's why I was "happy" that we saw it here again.

-------------------------------------
