> Do you really need the before_* methods in MirScreen?
> You could simply override the method and call a before function<> inside the test setup.
Ack. Changed!
> Why does that fix the issue? The lock ordering is still the same now?
The LockableCallback::lock() and unlock() functions are called before acquiring the internal alarm lock ([1]). So when the alarm callback occurs we now get [lock MirScreen], [lock Alarm], [dispatch callback] instead of [lock Alarm], [dispatch callback], [lock MirScreen] we had previously.
> Do you really need the before_* methods in MirScreen?
> You could simply override the method and call a before function<> inside the test setup.
Ack. Changed!
> Why does that fix the issue? The lock ordering is still the same now?
The LockableCallbac k::lock( ) and unlock() functions are called before acquiring the internal alarm lock ([1]). So when the alarm callback occurs we now get [lock MirScreen], [lock Alarm], [dispatch callback] instead of [lock Alarm], [dispatch callback], [lock MirScreen] we had previously.
[1] http:// bazaar. launchpad. net/~mir- team/mir/ development- branch/ view/head: /src/server/ glib_main_ loop_sources. cpp#L308