()
| 166 | awaiting = new Promise<void>((_) => _()); |
| 167 | |
| 168 | async doChecks(): Promise<() => void> { |
| 169 | let res1: () => void; |
| 170 | let cur = new Promise<void>((res) => { |
| 171 | res1 = res; |
| 172 | }); |
| 173 | [cur, this.awaiting] = [this.awaiting, cur]; |
| 174 | await cur; |
| 175 | |
| 176 | return () => res1(); |
| 177 | } |
| 178 | async getNext(): Promise<Progressive<T>> { |
| 179 | const checks = await this.doChecks(); |
| 180 | if (this.done) throw new Error("no more array"); |