Skip to content

Conversation

@NickCraver
Copy link
Collaborator

A few tweaks to the changes #2008 for disposing and normalization.

A few tweaks to the changes #2008 for disposing and normalization.
public void Dispose()
{
isDisposed = true;
_backlogAutoReset?.Dispose();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why ?. - this is readonly, don't see how it could end up null.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always like to guard in case this implementation changes later - agreed it's not needed atm.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose in the absence of nullable reference types that's reasonable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aye - this project isn't too large...should take that on one of these days.

Copy link
Collaborator

@philon-msft philon-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the other awaits I saw in ConnectionMultiplexer.cs without ForAwait():

await srv.PingAsync(flags); // if it isn't happy, we're not happy
await node.WriteDirectAsync(msg, ResultProcessor.DemandOK);
await srv.ReplicaOfAsync(null, flags);
await server.WriteDirectAsync(msg, ResultProcessor.DemandOK);
await node.WriteDirectAsync(msg, ResultProcessor.Int64);
await BroadcastAsync(nodes);
await node.WriteDirectAsync(msg, ResultProcessor.DemandOK);
await BroadcastAsync(nodes);
if (!await ReconfigureAsync(first: false, reconfigureAll: true, log, srv.EndPoint, "make master"))
return await ReconfigureAsync(first: false, reconfigureAll: true, logProxy, null, "configure").ObserveErrors();

@NickCraver
Copy link
Collaborator Author

@philon-msft ACK - for completeness let's handle those separately but agreed no reason not to tidy as long as we're supporting full framework.

@NickCraver NickCraver merged commit 6718fea into main Feb 24, 2022
@NickCraver NickCraver deleted the craver/2008-follow-ups branch February 24, 2022 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants