Merge lp:~alan-griffiths/mir/fix-1334287 into lp:mir
Status: | Merged |
---|---|
Approved by: | Alan Griffiths |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1725 |
Proposed branch: | lp:~alan-griffiths/mir/fix-1334287 |
Merge into: | lp:mir |
Diff against target: |
122 lines (+41/-30) 2 files modified
src/server/asio_main_loop.cpp (+33/-22) src/server/compositor/timeout_frame_dropping_policy_factory.cpp (+8/-8) |
To merge this branch: | bzr merge lp:~alan-griffiths/mir/fix-1334287 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Kevin DuBois (community) | Approve | ||
Andreas Pokorny (community) | Approve | ||
Cemil Azizoglu (community) | Approve | ||
Review via email: mp+224457@code.launchpad.net |
Commit message
server: Avoid race condition in AlarmImpl
Description of the change
Avoid race condition in AlarmImpl
The problem in lp:1334287 is that AlarmImpl doesn't meet this guarantee.
/**
* \note Destruction of the Alarm guarantees that the callback will not subsequently be called
*/
virtual ~Alarm() = default;
So, IIUC AlarmImpl:
Then (on some other thread) the TimeoutFrameDro
Back on the original thread and regardless of ~AlarmImpl() and AlarmImpl::cancel() having been called, data->callback() is invoked and chaos ensues.
Looks good.