This will improve support for tests that use Clock as well as offer
a way to remove use of Sleep() in the tests.
Bug: none
Change-Id: I25fd0c6fc1b52ec0c917e56fae6807b136213d8d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175566
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31305}
This reverts commit af1b9ceb62.
Reason for revert: Speculative reland after looking into downstream
failures. It's possible that carryover state from unrelated tests
running in parallel was causing failures.
Original change's description:
> Revert "Revert back to using the task_queue_ for guarding access."
>
> This reverts commit 475006d4a3.
>
> Reason for revert: Speculative revert. Breaks downstream project
>
> Original change's description:
> > Revert back to using the task_queue_ for guarding access.
> >
> > This removes the SequenceChecker that was temporarily used while
> > the rtc::Thread TQ implementation was being fixed.
> >
> > Bug: none
> > Change-Id: Iaa46e47371211ac0a97b2dcaf23cef12b43ee8ea
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175081
> > Commit-Queue: Tommi <tommi@webrtc.org>
> > Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#31256}
>
> TBR=tommi@webrtc.org,srte@webrtc.org
>
> Change-Id: I17a12bdca888a63f2fd161da30c0def5b9c3d04e
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: none
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175103
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31258}
TBR=tommi@webrtc.org,srte@webrtc.org,titovartem@webrtc.org
# Not skipping CQ checks because this is a reland.
Bug: none
Change-Id: I23992643126d7d6dae63da1bb14420b2b8794fd9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175135
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31283}
This reverts commit 475006d4a3.
Reason for revert: Speculative revert. Breaks downstream project
Original change's description:
> Revert back to using the task_queue_ for guarding access.
>
> This removes the SequenceChecker that was temporarily used while
> the rtc::Thread TQ implementation was being fixed.
>
> Bug: none
> Change-Id: Iaa46e47371211ac0a97b2dcaf23cef12b43ee8ea
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175081
> Commit-Queue: Tommi <tommi@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31256}
TBR=tommi@webrtc.org,srte@webrtc.org
Change-Id: I17a12bdca888a63f2fd161da30c0def5b9c3d04e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: none
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175103
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31258}
This removes the SequenceChecker that was temporarily used while
the rtc::Thread TQ implementation was being fixed.
Bug: none
Change-Id: Iaa46e47371211ac0a97b2dcaf23cef12b43ee8ea
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175081
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31256}
It isn't used and can easily be replaced with posting a task, as shown
in the changes to the unit test.
Also removing the sequenced task checker that no longer adds any value.
We now ensure that the task can only be stopped with a reference to the
task queue it runs on.
Bug: webrtc:10365
Change-Id: Ie8aef6f742c55db1fb686f20c2a28c606c721fa0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129725
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27292}
If the repeated task stopped itself, the return value does not matter,
therefore we don't have to check it.
Bug: webrtc:10365
Change-Id: I4a2c7a40a287dd0a8099628e228e9c319409576b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127545
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27121}
There seems to be a race caused by the libevent wrapping TaskQueue
implementation when reposting a repeated task at destruction time. This
race results in the posted task being leaked according to asan.
Bug: webrtc:10278
Change-Id: Ida40b884547f3f789a804ca0ab3ce36982a4d68e
Reviewed-on: https://webrtc-review.googlesource.com/c/121424
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26839}
This CL adds a single class to manage the use case of having a task
that repeats itself by a fixed or variable interval. It replaces the
repeating task previously locally defined for rtp transport controller
send as well as the cancelable periodic task. Furthermore, it is
introduced where one off repeating tasks were created before.
It provides the currently used functionality of the cancelable periodic
task, but not some of the unused features, such as allowing cancellation
of tasks before they are started and cancellation of a task after the
owning task queue has been destroyed.
Bug: webrtc:9883
Change-Id: Ifa7edee836c2a64fce16a7d0f682eb09c879eaca
Reviewed-on: https://webrtc-review.googlesource.com/c/116182
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26313}