watch method
watch takes list of watched keys and function that is executed during CAS opertion
Implementation
Future watch(List<String> watching_keys, func()) {
//return _cmd.send_object(["TRANS"]);
List<String> watchcmd = ["WATCH"];
watchcmd.addAll(watching_keys);
return Future.doWhile(() {
_completer_bool = Completer();
_cmd.send_object(watchcmd).then((_) {
func();
});
return _completer_bool.future;
});
}