Project

Profile

Help

Feature #5596

closed

IXSL construct for Promises.all

Added by Martynas Jusevicius about 2 years ago. Updated about 10 hours ago.

Status:
Resolved
Priority:
Normal
Category:
IXSL extensions
Sprint/Milestone:
Start date:
2022-07-09
Due date:
% Done:

0%

Estimated time:
Applies to JS Branch:
Trunk
Fix Committed on JS Branch:
Trunk
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

`Promises.all is very useful when executing multipe promises at the same time:

The Promise.all() method takes an iterable of promises as an input, and returns a single Promise that resolves to an array of the results of the input promises. This returned promise will resolve when all of the input's promises have resolved, or if the input iterable contains no promises. It rejects immediately upon any of the input promises rejecting or non-promises throwing an error, and will reject with this first rejection message / error.

Can we have an alternative in Saxon-JS 3? For example:

<ixsl:wait>
    <xsl:for-each select="elem">
        <ixsl:schedule-action ...>
    </xsl:for-each>

    <ixsl:on-completion>
        <xsl:message>All actions done</xsl:message>
    </ixsl:on-completion>
</ixsl:wait>
Actions #1

Updated by Michael Kay about 2 years ago

This is in the plans.

Actions #2

Updated by Debbie Lockett about 10 hours ago

  • Category set to IXSL extensions
  • Status changed from New to Resolved
  • Assignee set to Debbie Lockett
  • Sprint/Milestone set to SaxonJS 3.0
  • Applies to JS Branch Trunk added
  • Fix Committed on JS Branch Trunk added

The support for promises in SaxonJS 3 will include ixsl:all() (and other corresponding functions for concurrency).

Please register to edit this issue

Also available in: Atom PDF Tracking page