StaticLocks.ForceContention C# (CSharp) Méthode

ForceContention() public méthode

public ForceContention ( ) : void
Résultat void
    void ForceContention()
    {
        Thread t = new Thread(new ThreadStart(Contention));
        t.Start();
        Contention();
    }

Usage Example

Exemple #1
0
    public static void Main()
    {
        StaticLocks a = new StaticLocks();

        a.RunTest();
        a.RunTest();
        a.RunTest();

        Console.WriteLine("Forcing contention");
        a.ForceContention();
        Console.WriteLine("Contention forced");

        a.RunTest();
        a.RunTest();
        a.RunTest();
    }
All Usage Examples Of StaticLocks::ForceContention