[#24] Client: Implement pool part1 #31
No reviewers
Labels
No labels
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-sdk-csharp#31
Loading…
Reference in a new issue
No description provided.
Delete branch "PavelGrossSpb/frostfs-sdk-csharp:poll"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First iteration - base classes and methods
Signed-off-by: Pavel Gross p.gross@yadro.com
@ -483,0 +536,4 @@
return null;
}
catch (FrostFsException ex)
To tell the truth, it doesn't look pretty. Without examining the source code, it is unclear what the returned string means.
refactored
@ -0,0 +95,4 @@
await ScheduleGracefulClose().ConfigureAwait(false);
}
#pragma warning disable CA2000 // Dispose objects before losing scope: will be disposed manually
Could be resolved with
and why do I need a reference to disposed object?
I did not understand the question: where is the reference to disposed object?
There are 4 main steps:
try
block create an disposable object to this referencetry
block transfer ownership of disposable object from temp reference to new owner and setnull
to temp reference: nowClient
field holds reference to disposable object, not temp referencenull
Got it. But it looks like a strange trick to avoid dispose pattern warning that follows another analizer warning about "always null variable". The suppressing comment is a good reminder about dispose necessity and keeps the code clean and clear.
I don't think it is a trick, but if you ok with it, I'm ok too.
@ -0,0 +296,4 @@
);
}
private FrostFSClient? Сonnection()
See warning
fixed