Today, TargetList.watchTargets and ResourceWatcher.watch are having a different behavior regarding when these two method resolve.
For TargetList, it only resolves when all
onTargetAvailable callbacks for the watched target type resolved for all the already existing targets.
In the case of ResourceWatcher, we resolve only once we retrieve all the existing resources from the server, but do not wait for any async onResourceAvailable callback.
We might want to have the same behavior, so that:
- it would be easier in the future to merge TargetList and ResourceWatcher?
- these two API with very similar semantic follow the same behavior. Ans so we avoid confusion,
- we may at some point benefit from watchTarget's behavior when processing resources.