let get db k = let f s = t_of_sexp (Sexp.of_string s) in In_thread.run (fun () -> Option.map (LevelDB.get db k) ~f)