-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clean up interactive window creation #11544
Conversation
Codecov Report
@@ Coverage Diff @@
## main #11544 +/- ##
======================================
- Coverage 63% 63% -1%
======================================
Files 477 477
Lines 34133 34070 -63
Branches 5540 5529 -11
======================================
- Hits 21567 21501 -66
Misses 10505 10505
- Partials 2061 2064 +3
|
e41aeea
to
77afeda
Compare
const creationInProgress = createDeferred<void>(); | ||
// Ensure we don't end up calling this method multiple times when creating an IW for the same resource. | ||
this.pendingCreations.push(creationInProgress.promise); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading pendingCreation
, it gave me a feeling that we can have multiple creation in parallel. However we are awaiting for all pending creations to be complete before creating new ones, does it mean that pendingCreation.length <= 1
always? If so we can probably change it to pendingCreations: Promise<void> | null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I noticed that as well, I'll change it to better express that only one creation is happening at a time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me in overall. Only nick pick of how we manage pendingCreation
Part of #10808