mirror of
https://github.com/Azure/DotNetty.git
synced 2026-10-24 09:45:04 +08:00
Motivation: Modern language features provide for easier to read, more compact code. Modifications: - expression body for single line methods - Extra: fixes in xml docs - Extra: code style deviations in recent commits Result: Cleaner, more consistent code.
21 lines
626 B
C#
21 lines
626 B
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
|
namespace DotNetty.Transport.Tests.Performance.Utilities
|
|
{
|
|
using DotNetty.Common.Concurrency;
|
|
|
|
public class TaskCompletionSourceFinishedSignal : IReadFinishedSignal
|
|
{
|
|
readonly TaskCompletionSource tcs;
|
|
|
|
public TaskCompletionSourceFinishedSignal(TaskCompletionSource tcs)
|
|
{
|
|
this.tcs = tcs;
|
|
}
|
|
|
|
public void Signal() => this.tcs.TryComplete();
|
|
|
|
public bool Finished => this.tcs.Task.IsCompleted;
|
|
}
|
|
} |