Merge lp:~alan-griffiths/miral/fix-1628482 into lp:miral

Proposed by Alan Griffiths
Status: Merged
Approved by: Alan Griffiths
Approved revision: 372
Merged at revision: 372
Proposed branch: lp:~alan-griffiths/miral/fix-1628482
Merge into: lp:miral
Diff against target: 14 lines (+4/-0)
1 file modified
miral-shell/titlebar_provider.cpp (+4/-0)
To merge this branch: bzr merge lp:~alan-griffiths/miral/fix-1628482
Reviewer Review Type Date Requested Status
Andreas Pokorny (community) Approve
Review via email: mp+307034@code.launchpad.net

Commit message

Titlebar example: Separate destroying titlebar surfaces from shutdown to avoid possible deadlock

To post a comment you must log in.
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

So:
     enqueue_work([this]
         {
             {
                 std::lock_guard<decltype(mutex)> lock{mutex};
                 window_to_titlebar.clear();
             }
             connection.reset();
             stop_work();
         });

would fix the problem too?

review: Needs Information
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> So:
> enqueue_work([this]
> {
> {
> std::lock_guard<decltype(mutex)> lock{mutex};
> window_to_titlebar.clear();
> }
> connection.reset();
> stop_work();
> });
>
> would fix the problem too?

Probably. I haven't tried it.

Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

ok it does ... I was curious about the source of the dead lock..

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'miral-shell/titlebar_provider.cpp'
2--- miral-shell/titlebar_provider.cpp 2016-08-10 11:48:02 +0000
3+++ miral-shell/titlebar_provider.cpp 2016-09-28 14:11:59 +0000
4@@ -74,6 +74,10 @@
5 {
6 std::lock_guard<decltype(mutex)> lock{mutex};
7 window_to_titlebar.clear();
8+ });
9+
10+ enqueue_work([this]
11+ {
12 connection.reset();
13 stop_work();
14 });

Subscribers

People subscribed via source and target branches