Lock sealed class Lock Documentation Code using System.Threading; namespace Renci.SshNet.Common { internal sealed class Lock { public bool TryEnter() { return Monitor.TryEnter(this); } public void Exit() { Monitor.Exit(this); } } }