You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(webview): avoid race conditions in constructors. (#5961)
## Problem
In the constructor for `ApplicationComposerManager`, there is an async
call (non-awaited). This call is modifying state within the object and
therefore causes a race condition with any other function relying on
this state. See
https://github.com/aws/aws-toolkit-vscode/blob/81132884f4fb3319bda4be7d3d873265191f43ce/packages/core/src/applicationcomposer/webviewManager.ts#L30-L33
~This is potentially related to a flaky test.~ The test is still
failing, but this refactor is still a win.
## Solution
- Implement an async `create` method with a private constructor. Move
this pattern upward to enable async calls.
---
<!--- REMINDER: Ensure that your PR meets the guidelines in
CONTRIBUTING.md -->
License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
0 commit comments