Page MenuHomeSealhub

Add out-of-order rendering in tempstream
Open, LowPublic2 Points

Description

Add a race() function to Tempstream that will take an array of FlatTemplatables and races them - that is, renders them not in order that they appear in the template, but in the order that they are resolved. So

race([
sleep(200).then(()=>"\n200\n"),
sleep(100).then(()=>"\n100\n"),
sleep(300).then(()=>"\n300\n"),
])

Will return a stream that resolves to

100

200

300

This can later be used together with Declarative Shadow DOM for some neat HTML tricks.

Details

Reviewed by
kuba-orlik

Revisions and Commits

Event Timeline

ziomek updated Coded by, added: ziomek.
ziomek moved this task from To do to Doing on the Kanban board.
ziomek added a revision: Restricted Differential Revision.Mar 20 2024, 10:41
jenkins-user moved this task from Doing to Review on the Kanban board.
jenkins-user updated Action required from, added: FilipI; removed: ziomek.
jenkins-user added a subscriber: ziomek.
jenkins-user updated Action required from, added: kuba-orlik; removed: FilipI.
jenkins-user moved this task from Review to Doing on the Kanban board.
jenkins-user updated Action required from, added: ziomek; removed: kuba-orlik.

my misunderstending, I will ask about that at some point. I give the task back free to take

ziomek removed ziomek as the assignee of this task.Mar 25 2024, 13:35
ziomek updated Coded by, removed: ziomek.
ziomek updated Action required from, removed: ziomek.
jenkins-user updated Coded by, added: ziomek.
jenkins-user updated Action required from, added: ziomek.
ziomek removed ziomek as the assignee of this task.Apr 1 2024, 23:26
ziomek updated Coded by, removed: ziomek.
ziomek updated Action required from, removed: ziomek.