import { RwLock } from "https://deno.land/x/async@v2.1.0/mod.ts";
Acquires the lock for reading, and invokes the specified function with the current value of the lock. Other readers can acquire the lock simultaneously, but any writers will be blocked until the function completes.