public Usable <bool> TryBegin(TimeSpan timeout) => Usable.Begin(() => TryEnter(timeout), ret => { if (ret) { Exit(); } });
public Usable <bool> TryBegin() => Usable.Begin(() => TryEnter(), ret => { if (ret) { Exit(); } });
public Usable <bool> TryBegin(int millisecondsTimeout) => Usable.Begin(() => TryEnter(millisecondsTimeout), ret => { if (ret) { Exit(); } });
public Usable Begin() => Usable.Begin(() => Enter(), () => Exit());