the business scenario is like this
[getListA(),getListB(),getListC()]
getDetail()
getDetail
can only be executed after getList
is completed. How to judge that this queue is completed
idea 1: all requests are rewritten with async and await,
await getListA()
...
await getListC()
await getDetail()
but this will put all requests executed by Synchronize, while getListA (), getListB (), getListC ()
can be sent at the same time
idea 2: add a request completion flag to each List, loop monitor whether all requests are completed, and finish loading detail
< hr >is there a better way to implement