Moves ownership of time controller into NetworkEmulationManager.

This makes it easier to maintain consistency between real time
and simulated time modes.

The RealTimeController is updated to use an explicit main thread,
this ensures that pending destruction tasks are run as the network
emulator goes out of scope.

Bug: webrtc:11255
Change-Id: Ie73ab778c78a68d7c58c0f857f14a8d8ac027c67
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166164
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30342}
This commit is contained in:
Sebastian Jansson
2020-01-22 10:12:56 +01:00
committed by Commit Bot
parent 402379f1f3
commit 6ce033a863
23 changed files with 185 additions and 156 deletions

View File

@ -99,7 +99,7 @@ TEST(NetworkEmulationManagerPCTest, Run) {
signaling_thread->Start();
// Setup emulated network
NetworkEmulationManagerImpl emulation;
NetworkEmulationManagerImpl emulation(TimeMode::kRealTime);
EmulatedNetworkNode* alice_node = emulation.CreateEmulatedNode(
std::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig()));