• 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: SELECT
CHANGE BRANCH
x
  • No branch selected
  • FGasper-patch-1
  • fix-ci2
  • invert_free_order
  • issue_4_segfault_infinite_recursion
  • master
  • 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
24057610543 xs-all Merge 9f5075c5f into c75adcbf2 Pull #12 07 Apr 2026 12:12AM UTC web-flow github
87.71
24056741494 xs-all Merge 45cd9561a into c75adcbf2 Pull #12 06 Apr 2026 11:44PM 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
23889499363 fix-ci2 Merge c22bc219c into 1f4fb77c8 Pull #13 02 Apr 2026 07:36AM UTC web-flow github
84.75
23846594957 fix-ci2 Merge 12c0f9e41 into 1f4fb77c8 Pull #13 01 Apr 2026 11:37AM UTC web-flow github
84.75
23742043827 fix-ci2 Merge d7e733541 into 1f4fb77c8 Pull #13 30 Mar 2026 11:19AM UTC web-flow github
84.75
23726314414 fix-ci2 Merge a425be6d1 into 1f4fb77c8 Pull #13 30 Mar 2026 03:13AM UTC web-flow github
84.75
23703760795 fix-ci2 Merge 514458464 into 1f4fb77c8 Pull #13 29 Mar 2026 07:06AM UTC web-flow github
84.75
23401224430 xs-all Merge 06fa3c9d2 into 1f4fb77c8 Pull #12 22 Mar 2026 10:37AM UTC web-flow github
87.64
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