The result of Promise.new()
is just a reference to the promise. If you want to list all promises in an application, you need to get a reference to them when they're created.
Promise.all()
is not related to getting all active promises in an application, it's used for something else.
There is no magical way to get a list of all "in flight" promises in an application. You just need to get the variable references, the same way you would do for any other variable.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…