Mir

Merge lp://qastaging/~vanvugt/mir/fix-1151645 into lp://qastaging/~mir-team/mir/trunk

Proposed by Daniel van Vugt
Status: Merged
Approved by: Robert Carr
Approved revision: no longer in the source branch.
Merged at revision: 478
Proposed branch: lp://qastaging/~vanvugt/mir/fix-1151645
Merge into: lp://qastaging/~mir-team/mir/trunk
Diff against target: 216 lines (+135/-6)
4 files modified
src/client/mir_wait_handle.cpp (+16/-5)
src/client/mir_wait_handle.h (+4/-1)
tests/unit-tests/client/CMakeLists.txt (+1/-0)
tests/unit-tests/client/test_wait_handle.cpp (+114/-0)
To merge this branch: bzr merge lp://qastaging/~vanvugt/mir/fix-1151645
Reviewer Review Type Date Requested Status
Robert Carr (community) Approve
Alan Griffiths Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+152114@code.qastaging.launchpad.net

Commit message

MirWaitHandle: Add expect_result() method and some unit tests to fix
LP: #1151645.

expect_result() is required to support asymmetric usage patterns of a
MirWaitHandle like:
    mir_foo(x, A);
    mir_foo(x, B);
    mir_wait_for(mir_foo(x, C));
where mir_foo always reuses the same MirWaitHandle for x.

Previously, mir_wait_for would return as soon as any call to mir_foo finished,
meaning only A or B had completed. But clearly what we want is to wait for C.
That is what expect_result allows us to support as re-usable client functions like
mir_foo are added.

Description of the change

If this looks incomplete, that's because the bigger picture with real-world use case and integration test (mir_surface_{get|set}_type) is over here -->
lp:~vanvugt/mir/surface-types

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:474
http://jenkins.qa.ubuntu.com/job/mir-ci/8/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-quantal-amd64-ci/8//console

Click here to trigger a rebuild:
http://jenkins.qa.ubuntu.com/job/mir-ci/8//rebuild/?

review: Approve (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

I agree this is only a partial solution. But worth having.

review: Approve
Revision history for this message
Robert Carr (robertcarr) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches