Project

Profile

Help

Feature #5596

closed

IXSL construct for Promises.all

Added by Martynas Jusevicius over 2 years ago. Updated 3 days ago.

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

100%

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 over 2 years ago

This is in the plans.

Actions #2

Updated by Debbie Lockett 5 months 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).

Actions #3

Updated by Debbie Lockett 3 days ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in JS Release set to SaxonJS 3.0

Bug fix applied in the SaxonJS 3.0.0-beta1 preview release.

Please register to edit this issue

Also available in: Atom PDF Tracking page