Re:Use selective-await to reduce 99% of JavaScript async cal...
by etherdream on Friday June 24, 2022 @08:50PM
(#31871385)
This is not a problem, `await A` is called immediately after each read, so there will be no conflict.
The A function resolves to a singleton instance of Promise, which is updated by the class QuickReader. It means multiple instances of QuickReader will overwrite each other. In other words, A only works with the last instance of QuickReader created. I'm not sure if that's the intended behavior, but I would have designed it differently.