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 is holding the lock for reading or writing. Note this means that I may hold the lock for reading and then re-lock it for writing.