Fix deadlock in VideoSendStream tests, cause of flake on some bots.
Bug: webrtc:10861, webrtc:10880 Change-Id: Ic3ff9fab420e1fd634f58ef86d2f8890e23cfd03 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150220 Commit-Queue: Tommi <tommi@webrtc.org> Reviewed-by: Yves Gerey <yvesg@google.com> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28969}
This commit is contained in:
@ -32,6 +32,7 @@ class SingleThreadedTaskQueueForTesting {
|
||||
public:
|
||||
using Task = std::function<void()>;
|
||||
using TaskId = size_t;
|
||||
constexpr static TaskId kInvalidTaskId = static_cast<TaskId>(-1);
|
||||
|
||||
explicit SingleThreadedTaskQueueForTesting(const char* name);
|
||||
~SingleThreadedTaskQueueForTesting();
|
||||
@ -59,6 +60,13 @@ class SingleThreadedTaskQueueForTesting {
|
||||
// Returns true iff called on the thread associated with the task queue.
|
||||
bool IsCurrent();
|
||||
|
||||
// Returns true iff the task queue is actively being serviced.
|
||||
bool IsRunning();
|
||||
|
||||
bool HasPendingTasks() const;
|
||||
|
||||
void Stop();
|
||||
|
||||
private:
|
||||
struct QueuedTask {
|
||||
QueuedTask(TaskId task_id, int64_t earliest_execution_time, Task task);
|
||||
|
||||
Reference in New Issue
Block a user