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

Method reactivate

Libraries/AsyncStreams/AsyncStreams.cpp:429–459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

427}
428
429void AsyncReadableStream::reactivate(bool doReactivate)
430{
431 switch (state)
432 {
433 case State::SyncPushing: {
434 if (doReactivate)
435 {
436 state = State::SyncReadMore;
437 }
438 else
439 {
440 state = State::CanRead;
441 }
442 }
443 break;
444 case State::AsyncPushing: {
445 if (doReactivate)
446 {
447 executeRead(); // -> State::Reading
448 }
449 else
450 {
451 state = State::CanRead;
452 }
453 }
454 break;
455 default: {
456 emitError(Result::Error("AsyncReadableStream::reactivate - called in wrong state"));
457 }
458 }
459}
460
461void AsyncReadableStream::pause()
462{

Callers 2

readableAsyncStreamMethod · 0.80
processBodyDataMethod · 0.80

Calls 1

ErrorEnum · 0.50

Tested by 1

readableAsyncStreamMethod · 0.64