Asynchronous refresh cache by reading values from the instrument. :param keys: a string or list of strings with the properties to refresh Default None, meaning all properties. If keys is a string, returns the value. If keys is a
(self, keys=None, *, callback=None)
| 425 | return {key: getattr(self, key) for key in self._lantz_features} |
| 426 | |
| 427 | def refresh_async(self, keys=None, *, callback=None): |
| 428 | """Asynchronous refresh cache by reading values from the instrument. |
| 429 | |
| 430 | :param keys: a string or list of strings with the properties to refresh |
| 431 | Default None, meaning all properties. |
| 432 | If keys is a string, returns the value. |
| 433 | If keys is a list, returns a dictionary. |
| 434 | :type keys: str or list or tuple or dict |
| 435 | |
| 436 | :return type: concurrent.future. |
| 437 | |
| 438 | |
| 439 | """ |
| 440 | fut = self._submit(self.refresh, keys=keys) |
| 441 | if not callback is None: |
| 442 | fut.add_done_callback(callback) |
| 443 | return fut |
| 444 | |
| 445 | def recall(self, keys=None): |
| 446 | """Return the last value seen for a feat or a collection of feats. |
no outgoing calls