Closed Bug 1190176 Opened 5 years ago Closed 5 years ago
Scope] Layer Scope Web Socket Manager is not thread safe
LayerScopeWebSocketManager::AdConnection/ RemoveConnection are called from main thread and change mHandlers.Length() LayerScopeWebSocketManager::IsConnected is called from compisitor thread and read mHandlers.Length() It cause LayerScope receive unpaired frame data when click connect/disconnect button quickly at viewer side.
Hi Dan, Several things done in this patch: 1. (Major) Make LayerScopeWebSocketManager::mHandler thread safe We access this object in both main and compositor thread, need a mutex to guarantee thread safe. 2. (Minor) Move LayerScopeWebSocketHander into LayerScopeSocketManager Since only LayerScopeSocketManager uses LayerScopeWebSocketHandler, make it as an inline class of it. Since it's a inline class of LayerScopeWebSocketManager, shorten its name to SocketManager 3. (Minot) Move DebugListener into LayerScopeSockeManager Reason is the same with #2
Attachment #8642326 - Flags: review?(dglastonbury)
Attachment #8642326 - Flags: review?(dglastonbury) → review+
You need to log in before you can comment on or make changes to this bug.