val with_lock : ?client:Client.t->t->(unit ->'a Lwt.t)->'a Lwt.t
with_lock ?client t f executes f () when no other client has held the lock exclusively for writing. Note this means that I may hold the lock for writing and then re-lock it for reading.