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

Method init

Libraries/AsyncStreams/AsyncStreams.cpp:332–341  ·  view source on GitHub ↗

------------------------------------------------------------------------------------------------------- AsyncReadableStream -------------------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

330// AsyncReadableStream
331//-------------------------------------------------------------------------------------------------------
332Result AsyncReadableStream::init(AsyncBuffersPool& buffersPool)
333{
334 SC_TRY_MSG(state == State::Stopped or state == State::Ended,
335 "AsyncReadableStream::init - Can be called only in Stopped / Destroyed / Ended state")
336 SC_TRY_MSG(readQueue.size() > 0, "AsyncReadableStream::init - setReadQueue not called")
337 buffers = &buffersPool;
338 state = State::CanRead;
339 destroyed = false;
340 return Result(true);
341}
342
343AsyncReadableStream::~AsyncReadableStream() {}
344

Callers

nothing calls this directly

Calls 5

setReadQueueFunction · 0.85
setWriteQueueFunction · 0.85
initFunction · 0.85
ResultClass · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected