Commit a02f94b
committed
fix: use separate network thread in PeerConnectionFactory
Previously, the same thread was passed for both network_thread and
worker_thread to CreatePeerConnectionFactory. In M114, many operations
moved to the network thread, and PeerConnection::Close() does
sequential BlockingCalls to network then worker threads
(pc/peer_connection.cc:1909-1929). Sharing a single thread caused
cleanup contention that limited sequential connection throughput.
This matches Chrome's architecture (pc/connection_context.cc:85-98)
where network, worker, and signaling threads are all separate. The
network thread gets a socket server for ICE port management, matching
the CreateWithSocketServer() pattern Chrome uses.1 parent 8134487 commit a02f94b
2 files changed
Lines changed: 20 additions & 5 deletions
Lines changed: 19 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
| 55 | + | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
59 | 71 | | |
60 | 72 | | |
61 | 73 | | |
| |||
93 | 105 | | |
94 | 106 | | |
95 | 107 | | |
96 | | - | |
| 108 | + | |
97 | 109 | | |
98 | 110 | | |
99 | 111 | | |
| |||
105 | 117 | | |
106 | 118 | | |
107 | 119 | | |
108 | | - | |
| 120 | + | |
109 | 121 | | |
110 | 122 | | |
111 | 123 | | |
112 | | - | |
| 124 | + | |
113 | 125 | | |
114 | 126 | | |
115 | 127 | | |
| |||
118 | 130 | | |
119 | 131 | | |
120 | 132 | | |
| 133 | + | |
121 | 134 | | |
122 | 135 | | |
123 | 136 | | |
| 137 | + | |
124 | 138 | | |
125 | 139 | | |
126 | 140 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
0 commit comments