It's readable if you're familiar with the RAII pattern which is used in languages like C++ and Go.
with lock {
// do stuff
}
design. This could be C++ too to be honest because lambdas exist but RAII is just too common for people to design their locks like this.This syntax looks more like Python or Rust.