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

iconara / ione
100%
master: 99%

Build:
Build:
LAST BUILD BRANCH: v1.2.4
DEFAULT BRANCH: master
Repo Added 02 Mar 2014 06:43PM UTC
Files 12
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 stack-safe-after
branch: stack-safe-after
CHANGE BRANCH
x
Reset
  • stack-safe-after
  • 1.2.0.pre4
  • acceptor-host-and-port
  • after-factory
  • byte-buffer-getbyte
  • byte-buffer-index
  • deprecate-future-value
  • destructive-future-combinators
  • fix-jruby-test-issues
  • fix-warnings
  • future_improvements
  • handle_badf_in_select
  • http_server
  • improve-base-connection-locks
  • io-reactor-drain
  • master
  • optimize-resolved-combine
  • optimize_future_combinators
  • optimized_scheduler
  • restartable_reactor
  • running-while-stopping
  • ssl_support
  • ssl_support_on_1.2
  • stack-safe-reduce
  • streams
  • synchronized_close
  • thread-pooling
  • travis-test
  • travis_debug
  • try-complete-promise
  • unblock-once
  • uncaught-error-handler
  • v1.0.0
  • v1.1.0
  • v1.1.0.pre0
  • v1.1.1
  • v1.1.2
  • v1.1.3
  • v1.1.4
  • v1.1.5
  • v1.1.x
  • v1.2.0.pre0
  • v1.2.0.pre1
  • v1.2.0.pre2
  • v1.2.0.pre3
  • v1.2.0.pre4
  • v1.2.0.pre6
  • v1.2.0.pre7
  • v1.2.0.pre8
  • v1.2.1
  • v1.2.2
  • v1.2.3
  • v1.2.4
  • v1.2.x
  • v1.3.0.pre0
  • v1.3.0.pre1
  • v1.3.0.pre2

pending completion
205

push

travis-ci

grddev
Avoid stack overflow error with Future.after

With a long list of resolved futures, the previous implementation
caused a stack-overflow exception, as each call to await_next happened
within the previous call (synchronously).

This changes the behavior to loop over futures instead of using
recursion while on_complete dispatches synchronously in the same thread.
To avoid code duplication we always dispatch in the terminating cases,
even if it introduces an extra stack frame. The looping condition
protects against cases where a future would be resolved at a later
point by the calling thread (which is what the tests do), and the last
part of the condition protects against dispatching in other threads.

While the algorithm looks like a loop that adds multiple concurrent
on_complete listeners, the intention is in fact still to only ever have
one concurrent listener, making sure that the combined nil future is
only ever accessed from one thread at a time (without using locks).

2616 of 2623 relevant lines covered (99.73%)

19247.03 hits per line

Relevant lines Covered
Build:
Build:
2623 RELEVANT LINES 2616 COVERED LINES
19247.03 HITS PER LINE
Source Files on stack-safe-after
Detailed source file information is not available for this build.

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
205 stack-safe-after Avoid stack overflow error with Future.after With a long list of resolved futures, the previous implementation caused a stack-overflow exception, as each call to await_next happened within the previous call (synchronously). This changes the beha... push 14 Jul 2015 01:41PM UTC grddev travis-ci pending completion  
See All Builds (272)
  • 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

© 2025 Coveralls, Inc