.NET Fiddle

CSharp · Console

/Program.cs

using System;
using System.Threading;
using System.Threading.Tasks;
using System.Threading.Tasks.Dataflow;

static class Program
{
    static async Task Main()
    {
        var block1 = new BufferBlock<int>();
        var block2 = new BufferBlock<int>();
        block1.LinkTo(block2, new() { PropagateCompletion = true });
        block1.Post(1);
        block1.Complete();
        //Thread.Sleep(100);
        await block1.Completion;
        block2.TryReceiveAll(out var items);
        bool completed = block2.Completion.Wait(500);
        Console.WriteLine($"block2 completed in time: {completed}");
    }
}
;