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

Method emitOnData

Libraries/AsyncStreams/AsyncStreams.cpp:356–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354}
355
356void AsyncReadableStream::emitOnData()
357{
358 Request request;
359 while (readQueue.popFront(request))
360 {
361 eventData.emit(request.bufferID);
362 buffers->unrefBuffer(request.bufferID); // 1b. refBuffer in push
363 if (state == State::Pausing or state == State::Paused or (state == State::Ended and not readQueue.isEmpty()))
364 {
365 break;
366 }
367 }
368 maybeDestroyEndedReadable();
369}
370
371bool AsyncReadableStream::push(AsyncBufferView::ID bufferID, size_t newSize)
372{

Callers

nothing calls this directly

Calls 2

unrefBufferMethod · 0.80
isEmptyMethod · 0.45

Tested by

no test coverage detected