Given a local or remote subscriber, returns a local AsyncIterable which provides "lossy" iterations of the underlying PublicationList. By "lossy", we mean that you may miss any published state if a more recent published state can be reported instead.
If the underlying PublicationList is terminated by upgrade of the producer, it will be re-requested. All other terminal values will be losslessly propagated.
Deprecated
Use
subscribeLatestfrom@agoric/notifier/subscribe.jsinstead.Adaptor from a notifierP to an async iterable. The notifierP can be any object that has an eventually invocable
getUpdateSincemethod that behaves according to the notifier spec. This can be a notifier, a promise for a local or remote notifier, or a presence of a remote notifier.It is also used internally by notifier.js so that a notifier itself is an async iterable.
An async iterable is an object with a
[Symbol.asyncIterator]()method that returns an async iterator. The async iterator we return here has only anext()method, without the optionalreturnandthrowmethods. The omitted methods, if present, would be used by the for/await/of loop to inform the iterator of early termination. But this adaptor would not do anything useful in reaction to this notification.An async iterator's
next()method returns a promise for an iteration result. An iteration result is a record withvalueanddoneproperties.The purpose of building on the notifier protocol is to have a lossy adaptor, where intermediate results can be missed in favor of more recent results which are therefore less stale. See https://github.com/Agoric/documentation/blob/HEAD/main/guides/js-programming/notifiers.md
Template: T
Param: notifierP
Returns