avoid unnecessary NewCreator calls#4529
Merged
estesp merged 1 commit intocontainerd:masterfrom Sep 21, 2020
Merged
Conversation
|
Build succeeded.
|
mikebrow
reviewed
Sep 4, 2020
Member
There was a problem hiding this comment.
suggest moving this if then block to the line before NewTask if ioCreator has not been set... thus removing all unnecessary NewCreator calls..?
Contributor
Author
There was a problem hiding this comment.
suggest moving this if then block to the line before NewTask if ioCreator has not been set... thus removing all unnecessary NewCreator calls..?
@mikebrow adopt your suggestion, PTAL. I have to cleanup some code at the same time because windows didn't take care of StdinCloser and logURI.
Contributor
Author
There was a problem hiding this comment.
I finally choose removing unnecessary NewCreator in NewTask because it won't change too much.
33a32b0 to
b107c73
Compare
|
Build succeeded.
|
084b23c to
15ad582
Compare
Contributor
Author
|
PTAL @AkihiroSuda @dmcgowan |
|
Build succeeded.
|
Signed-off-by: Guanjun Gong <[email protected]>
Contributor
Author
Done, PTAL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Guanjun Gong [email protected]
containerd/cmd/ctr/commands/tasks/tasks_unix.go
Lines 75 to 99 in f543f2f
ioCreatorcan be built at most 4 times, we should avoid unnecessary init.