Open AirChen opened 4 years ago
Hi AirChen, is there a reason you don't want to simply chain the same block on all promises you're interested in, but rather prefer an observer object to store such blocks and chain the observer for each promise instead?
@shoumikhin Thanks for your reply , but in some case that you have a branch of promises to request a list of items , and all blocks are needed for this function . Putting those blocks together could be better , in my opinion. 😁
For this pull request https://github.com/google/promises/pull/152
@AirChen are there other promises libraries with similar API? I'm wondering if this is common; I'd be interested in looking through discussions other folks have had about this pattern.
Emmm… Sometime , I think those APIs is better for debugging…
In This Case:
When I develop a POI search function of a Driver Guidance Application , there is some difference POI requests . I used the promise to implement those difference requests , but every result of each request is tightly following it's request .👻 I want to integrate all results together , to display different UI in the common View . So I need a new API to observe all promise handled cases .