This is used to avoid thread processing in simulated time
controller. This saves up to 30% execution time in debug builds.
Bug: webrtc:10365
Change-Id: Ie83dfb2468d371e4687d28c776acf7e23eb411d1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133173
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27666}
We need to keep the lock until we have finished using the task runner
returned by GetNextReadyRunner to ensure that we don't remove it from
another thread. Additionally, we must get only one runner at a time in
case the first runner removes the second runner.
Bug: webrtc:10538
Change-Id: Idbd5610b67666238545b3a321fb79f7e86fcac56
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132342
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27584}
Replacing sets of pointers (that will depend on allocation addresses)
with vectors and lists. This allows deterministic execution.
Also doing some cleanup of the task queue configuration, ensuring that
the task queue states is not set outside of actual task queues.
Bug: webrtc:10365
Change-Id: I1fad621c7b1ba0bbb33db8c3bd69cb3a1e212b9c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130460
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27364}
This CL introduces the TimeControllerInterface that provides timing
related functionality. Most notably it provides a TaskQueueFactory
and facilitates creation of ProcessThread.
Two implementations of the interface are provided, RealTimeController
and SimulatedTimeController.
This prepares for an upcoming CL using these in Scenario tests.
Bug: webrtc:10365
Change-Id: Id956a29628d7e2f53ecaedadd643a9f697329d2f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127297
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27244}