• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

FGasper / p5-Promise-XS
88%

Build:
DEFAULT BRANCH: master
Repo Added 10 Nov 2020 01:05AM UTC
Files 6
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH master
branch: master
CHANGE BRANCH
x
Reset
  • master
  • FGasper-patch-1
  • fix-ci2
  • invert_free_order
  • issue_4_segfault_infinite_recursion
  • xs-all

08 Apr 2026 01:50AM UTC coverage: 87.711% (+3.0%) from 84.755%
24113385519

push

github

web-flow
Reimplement all method in XS (#12)

## Summary

  Implement `all()` in XS (C), replacing the previous pure-Perl implementation.

  ## Motivation

  The old Perl implementation chained `.then()` calls sequentially:

  ```perl
  $all_done = $all_done->then(sub {
      @results = @_;
      return $p;
  })->then(sub { (@results, [@_]) });
  ```

  This meant promise N was not awaited until promise N−1 had already resolved —
  contrary to Promise/A+ semantics. The new XS implementation attaches callbacks
  to all input promises independently, giving true parallel waiting.

  ## Changes

  - **`XS.xs`**: Add `XSPR_CALLBACK_ALL` callback type and `pxs_all_state_t` shared state. Each input promise gets its own callback; when all resolve the output promise is resolved with an
   array-ref per input. The first rejection short-circuits and propagates to the output promise; subsequent rejections are silently suppressed (their `rejection_should_warn` flag is
  cleared) so only one unhandled-rejection warning is emitted. Exception safety during initialisation is provided by `SAVEDESTRUCTOR_X` guards that free partially-constructed state on
  croak/die.
  - **`lib/Promise/XS/Promise.pm`**: Remove the now-superseded Perl `all()`.
  - **`t/unhandled_rejection.t`**: Add regression tests confirming that a caught `all()` rejection produces no warnings, and an uncaught one produces exactly one warning (from the output
  promise, not from each input).

  ## Behavioural notes for users

  | Aspect | Before | After |
  |--------|--------|-------|
  | Execution model | Sequential (chained `.then()`) | Parallel (independent callbacks) |
  | Return value format | `([v1…], [v2…], …)` | Same |
  | Unhandled rejection warnings | Could leak multiple warnings | Exactly one warning from output |
  | Performance | O(N) Perl call overhead | XS |

  The return-value format is unchanged. Code that accidentally relied on sequential execution (e.g. ordering side-effects through `all()`) sh... (continued)

63 of 63 new or added lines in 1 file covered. (100.0%)

728 of 830 relevant lines covered (87.71%)

548.86 hits per line

Relevant lines Covered
Build:
Build:
830 RELEVANT LINES 728 COVERED LINES
548.86 HITS PER LINE
Source Files on master
  • Tree
  • List 6
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
24113385519 master Reimplement all method in XS (#12) ## Summary Implement `all()` in XS (C), replacing the previous pure-Perl implementation. ## Motivation The old Perl implementation chained `.then()` calls sequentially: ```perl $all_done = $all_don... push 08 Apr 2026 01:51AM UTC web-flow github
87.71
24056082859 master Fix: Modernize Perl test matrix and optimize CI environment (#13) This PR fixes several environment-related issues and modernizes the Perl test suite to ensure better compatibility and performance. ### Changes * **Add: Modernize supported Perl ... push 06 Apr 2026 11:21PM UTC web-flow github
84.75
4727689986 master Merge pull request #9 from FGasper/FGasper-patch-1 push 18 Apr 2023 01:59AM UTC GitHub github pending completion  
4662665268 master 0.20 release push 11 Apr 2023 12:55AM UTC Felipe Gasper github pending completion  
4442311709 master 0.19 release push 16 Mar 2023 10:49PM UTC Felipe Gasper github pending completion  
4401707046 master no cmake in CI push 13 Mar 2023 05:28AM UTC Felipe Gasper github pending completion  
4401677673 master add BSD CI push 13 Mar 2023 05:24AM UTC Felipe Gasper github pending completion  
4401662241 master another crack at the refcount push 13 Mar 2023 05:20AM UTC Felipe Gasper github pending completion  
4276163763 master simplify new promise struct push 26 Feb 2023 05:37PM UTC Felipe Gasper github pending completion  
4276130113 master bump version push 26 Feb 2023 05:31PM UTC Felipe Gasper github pending completion  
See All Builds (150)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc