Lock constructor

Lock({
  1. bool reentrant = false,
})

Creates a Lock object.

if reentrant, it uses Zone to allow inner synchronized calls.

Implementation

factory Lock({bool reentrant = false}) {
  if (reentrant == true) {
    return ReentrantLock();
  } else {
    return BasicLock();
  }
}