| 637 | } |
| 638 | |
| 639 | bool AsyncReadableStream::getBufferOrPause(size_t minumumSizeInBytes, AsyncBufferView::ID& bufferID, Span<char>& data) |
| 640 | { |
| 641 | if (getBuffersPool().requestNewBuffer(minumumSizeInBytes, bufferID, data)) |
| 642 | { |
| 643 | return true; |
| 644 | } |
| 645 | else |
| 646 | { |
| 647 | pause(); |
| 648 | return false; |
| 649 | } |
| 650 | } |
| 651 | |
| 652 | //------------------------------------------------------------------------------------------------------- |
| 653 | // AsyncWritableStream |