StaticLocks.ForceContention C# (CSharp) Method

ForceContention() public method

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

Usage Example

Example #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