webrtc/rtc_base/task_queue_for_test.cc
Tommi 685615678a Introduce TaskQueueForTest.
This class adds a convenience method that allows *sending* a task
to the queue (as opposed to posting). Sending is essentially
Post+Wait, a pattern that we don't want to encourage use of
in production code, but is convenient to have from a testing
perspective and there are already several places in the
source code where we use it.

Change-Id: I6efd1b2257e6c641294bb6e4eb53b0021d9553ca
Bug: webrtc:8848
Reviewed-on: https://webrtc-review.googlesource.com/50441
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22022}
2018-02-14 15:32:49 +00:00

19 lines
687 B
C++

/*
* Copyright 2018 The WebRTC Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "rtc_base/task_queue_for_test.h"
namespace rtc {
namespace test {
TaskQueueForTest::TaskQueueForTest(const char* queue_name, Priority priority)
: TaskQueue(queue_name, priority) {}
TaskQueueForTest::~TaskQueueForTest() {}
} // namespace test
} // namespace rtc