> Can be replaced with:
>
> auto handle = client_acquire_async(q);
> handle->wait_for(std::chrono::seconds(3));
> ASSERT_THAT(handle->has_acquired_buffer(), Eq(true));
For this test we need the following sequence of events to occur:
1. client_acquire_async() request (which blocks because we have already client_acquired/released the only buffer previously)
2. compositor_acquire() which gets the single buffer and also releases the only buffer back to the client and unblocks it
So a single thread wouldn't work because it would block in handle->wait_for(std::chrono::seconds(3)); (and fail).
> Use AutoJoinThread so that thread is still joined in case compositor_acquire
> or compositor_release throws.
> Can be replaced with: acquire_ async(q) ; >wait_for( std::chrono: :seconds( 3)); THAT(handle- >has_acquired_ buffer( ), Eq(true));
>
> auto handle = client_
> handle-
> ASSERT_
For this test we need the following sequence of events to occur:
1. client_ acquire_ async() request (which blocks because we have already client_ acquired/ released the only buffer previously) acquire( ) which gets the single buffer and also releases the only buffer back to the client and unblocks it
2. compositor_
So a single thread wouldn't work because it would block in handle- >wait_for( std::chrono: :seconds( 3)); (and fail).
> Use AutoJoinThread so that thread is still joined in case compositor_acquire
> or compositor_release throws.
Will do.