| 654 | // ============================================================================= |
| 655 | |
| 656 | function createReadable(queue) { |
| 657 | return { |
| 658 | __proto__: null, |
| 659 | [SymbolAsyncIterator]() { |
| 660 | return { |
| 661 | __proto__: null, |
| 662 | async next() { |
| 663 | return queue.read(); |
| 664 | }, |
| 665 | async return() { |
| 666 | queue.consumerReturn(); |
| 667 | return { __proto__: null, done: true, value: undefined }; |
| 668 | }, |
| 669 | async throw(error) { |
| 670 | queue.consumerThrow(error); |
| 671 | return { __proto__: null, done: true, value: undefined }; |
| 672 | }, |
| 673 | }; |
| 674 | }, |
| 675 | }; |
| 676 | } |
| 677 | |
| 678 | // ============================================================================= |
| 679 | // Stream.push() Factory |