Fiber loops in Renderer and BigPipe are never suspended

Created on 13 October 2023, about 1 year ago
Updated 21 October 2023, about 1 year ago

Problem/Motivation

Fiber loops in Renderer and BigPipe are never suspended due to $iterations being reset at every iteration of the while loop
This is follow up for https://www.drupal.org/project/drupal/issues/3377570 📌 Add PHP Fibers support to BigPipe RTBC

Steps to reproduce

  1. Create a placeholder callback that call Fiber::suspend at least twice
  2. Place breakpoint in the BigPipe.php:577 where it suspends to allow higher code to execute
  3. Iterations are always 0 so Fiber::suspend never called

It does not really affect anything yet because there are no higher fibers yet.

Proposed resolution

Move the $iterations declaration out of the while loops.

Remaining tasks

  • Move $iteration declarations
  • Provide tests if possible/needed

User interface changes

-

API changes

-

Data model changes

-

Release notes snippet

-

🐛 Bug report
Status

Fixed

Version

10.2

Component
BigPipe 

Last updated 17 days ago

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024