Skip to content

Instantly share code, notes, and snippets.

View markjasongalang's full-sized avatar
🎯
Dedicate your heart

Mark Jason markjasongalang

🎯
Dedicate your heart
View GitHub Profile
@markjasongalang
markjasongalang / Program.cs
Created October 4, 2025 12:01
Generic Only One Pattern using .NET (C#)
namespace AsynchronousProgramming
{
/// <summary>
/// This is an implementation of the Generic Only One Pattern and I modified it a bit
/// to correctly cancel the remaining tasks running.
///
/// Reference: https://dotnettutorials.net/lesson/only-one-pattern-in-csharp/
/// </summary>
public class Program
{