1.10 and Orchard.TaskLease , distributed locks

Topics: Announcements, Core, General
Feb 1 at 10:26 PM
in orchard 1.10, it is said that
Orchard.TaskLease has been deprecated in favor or distributed locks

where is (or are) the code of the distributed locks ?
or are there any material or video?

in short, what should we use to replace the old code of Orchard.TaskLease?
Feb 5 at 10:24 PM
Instead of using ITaskLeaseService, use IDistributedLockService, which lives in the Orchard.Framework project (Tasks/LockingServices).
Lookf or its usages in the Orchard codebase to see how it's used. For example, the AutomaticDataMigrations uses it as follows:
IDistributedLock @lock;
if (_distributedLockService.TryAcquireLock(GetType().FullName, TimeSpan.FromMinutes(30), TimeSpan.FromMilliseconds(250), out @lock)) {
    using (@lock) {
        /// Do stuff.