Home General

lock statement in LINQPad and async code

The LINQPad and LINQPad.Controls classes rely on lock statements. How does it coexist with async code?

// LINQPad.DumpContainer

public string Style
{
    get
    {
        lock (_lock)
        {
            return _style;
        }
    }
    set
    {
        lock (_lock)
        {
            if (!(_style == value))
            {
                _style = value;
                this.StyleChanged(this, EventArgs.Empty);
            }
        }
    }
}
Sign In or Register to comment.