MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / getBufferOrPause

Method getBufferOrPause

Libraries/AsyncStreams/AsyncStreams.cpp:639–650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

637}
638
639bool 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

Callers 3

readableAsyncStreamMethod · 0.80
asyncReadMethod · 0.80
afterReadMethod · 0.80

Calls 1

requestNewBufferMethod · 0.80

Tested by 1

readableAsyncStreamMethod · 0.64