-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
FIx (xml-) config classes for thread-safe issues #1157
Conversation
Current coverage is
|
Wouldn't it be better if you expose a lock variable and use the same during modification of the list? |
Good question. Well locks are more expensive then creating objects. (CPU, lock is some kind of thread sleep) And when the collection is changed while processing, it's isn't wrong to continue progressing the old collection. Or do you see it otherwise? |
99833fc
to
7bded04
Compare
@304NotModified I don't have any other thoughts on the locking. But I do have few questions and comments on the changes. |
@@ -302,8 +308,10 @@ public void Uninstall(InstallationContext installationContext) | |||
internal void Close() | |||
{ | |||
InternalLogger.Debug("Closing logging configuration..."); | |||
foreach (ISupportsInitialize initialize in this.configItems.OfType<ISupportsInitialize>()) | |||
var supportsInitializesList = this.configItems.OfType<ISupportsInitialize>().ToList(); |
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.
Can you create method similar to GetInstallableItems
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.
Thanks. I needed a parameters for the reverse()
in this case (performance)
Thanks for the review @page-not-found . I applied most of your suggestions, see code comment . Please double check. If you think it's OK, just merge it :) |
Sure. I just now added some more comments. Can you also check to see there
|
I don't see the Merge pull request button. it is disabled. |
(Travis has some issues, e.g. timeouts when restoring packages, in multiple branches seen) |
84acb14
to
6c5bad8
Compare
@page-not-found if you check this again, please do. I reverted (and squashed) some previous commutes. I use now every time a variable with |
@page-not-found, you're now a gladiator? ;) |
I am good with all of the code now. But I still prefer to use the One small suggestion, when you have just one line with in a |
That's a matter of style ;). I personally prefer omitting |
if ((err = SSLHashSHA1.update(&hashCtx, &serverRandom)) != 0)
goto fail;
if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0)
goto fail;
goto fail;
if ((err = SSLHashSHA1.final(&hashCtx, &hashOut)) != 0)
goto fail;
err = sslRawVerify(...); The enormous SSL fail of Apple (2014) |
I agree will you both. We are good to merge. |
Thanks for checking @page-not-found! |
FIx (xml-) config classes for thread-safe issues
Replacing foreach with for, for thread-safe usage
For
forces uses to use lists.(also
for
is most of the time more performant)fixes #1153