Skip to content

Commit

Permalink
fix: update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
m.tre committed Jun 19, 2024
1 parent 6e7026a commit 387dfc5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Vostok.Hosting/VostokHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public Task<VostokApplicationRunResult> StopAsync(bool ensureSuccess = true)
public VostokHost RegisterSigtermCancellation()
{
#if NET6_0_OR_GREATER
// Saving PosixSignalRegistration to variable, because of IDisposable inheritance,
// Saving PosixSignalRegistration reference to nameof(VostokHost) field, because of IDisposable inheritance,
// and GC will collect if not assigned. On Dispose and finalize handler will unregister.
if (sigtermRegistration == null)
{
Expand Down
4 changes: 3 additions & 1 deletion Vostok.Hosting/VostokHost_Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ public static VostokHost WithConsoleCancellation([NotNull] this VostokHost vosto
return vostokHost;
}

[Obsolete("Use VostokHost.RegisterSigtermCancellation instead of this")]
/// <summary>
/// Makes same as <see cref="VostokHost.RegisterSigtermCancellation"/>
/// </summary>
public static VostokHost WithSigtermCancellation([NotNull] this VostokHost vostokHost) =>
vostokHost.RegisterSigtermCancellation();
}
Expand Down

0 comments on commit 387dfc5

Please sign in to comment.