PHPackages                             icecave/interlude - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. icecave/interlude

ActiveLibrary[Queues &amp; Workers](/categories/queues)

icecave/interlude
=================

Emulated timeouts for synchronous operations.

0.1.0(11y ago)539.1k↑147.1%[1 issues](https://github.com/IcecaveStudios/interlude/issues)1MITPHPPHP &gt;=5.3

Since Nov 10Pushed 11y ago3 watchersCompare

[ Source](https://github.com/IcecaveStudios/interlude)[ Packagist](https://packagist.org/packages/icecave/interlude)[ Docs](https://github.com/IcecaveStudios/interlude)[ RSS](/packages/icecave-interlude/feed)WikiDiscussions develop Synced today

READMEChangelog (1)Dependencies (3)Versions (3)Used By (1)

Interlude
=========

[](#interlude)

[![Build Status](https://camo.githubusercontent.com/4701509593361d98843b1d85f5a631cd5dc8f1d0292d92df26899a4b79e688e0/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f4963656361766553747564696f732f696e7465726c7564652f646576656c6f702e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/IcecaveStudios/interlude)[![Test Coverage](https://camo.githubusercontent.com/25ac8afac8a2baad26f8e52a2868be0fb08362603d7be74f2fa32071c3ab8a76/687474703a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f4963656361766553747564696f732f696e7465726c7564652f646576656c6f702e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/r/IcecaveStudios/interlude?branch=develop)[![SemVer](https://camo.githubusercontent.com/fb75778f0b8ecb78725e6804d34eb2c10611b0a0007372b602b583398aaaf5ce/687474703a2f2f696d672e736869656c64732e696f2f3a73656d7665722d302e312e302d79656c6c6f772e7376673f7374796c653d666c61742d737175617265)](http://semver.org)

**Interlude** is a small PHP library for repeating a non-blocking operation until it succeeds, a timeout period is reached, or a maximum number of attempts have been performed.

If you don't need the timeout feature, you might want to try [igorw/retry](https://github.com/igorw/retry).

- Install via [Composer](http://getcomposer.org) package [icecave/interlude](https://packagist.org/packages/icecave/interlude)
- Read the [API documentation](http://icecavestudios.github.io/interlude/artifacts/documentation/api/)

Example
-------

[](#example)

```
use Icecave\Interlude\Exception\AttemptsExhaustedException;
use Icecave\Interlude\Exception\TimeoutException;
use Icecave\Interlude\Invoker;

$invoker = new Invoker;

$operation = function ($remainingTimeout, $remainingAttempts) {
    // do work ...
};

try {
    $invoker->invoke(
        $operation,
        10, // ten second timeout
        3   // maximum of three attempts
    );
} catch (TimeoutException $e) {
    echo 'The operation timed out!' . PHP_EOL;
} catch (AttemptsExhaustedException $e) {
    echo 'The operation was attempted the maximum number of times!' . PHP_EOL;
}
```

Contact us
----------

[](#contact-us)

- Follow [@IcecaveStudios](https://twitter.com/IcecaveStudios) on Twitter
- Visit the [Icecave Studios website](http://icecave.com.au)
- Join `#icecave` on [irc.freenode.net](http://webchat.freenode.net?channels=icecave)

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4254d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/93a71bd75fcd51efee464532dbdd54927cd00e938805998c76e0a804d38fa3fb?d=identicon)[jmalloc](/maintainers/jmalloc)

---

Top Contributors

[![jmalloc](https://avatars.githubusercontent.com/u/761536?v=4)](https://github.com/jmalloc "jmalloc (15 commits)")

---

Tags

asynctimeoutretrysyncrepeatttl

### Embed Badge

![Health badge](/badges/icecave-interlude/health.svg)

```
[![Health](https://phpackages.com/badges/icecave-interlude/health.svg)](https://phpackages.com/packages/icecave-interlude)
```

###  Alternatives

[amphp/amp

A non-blocking concurrency framework for PHP applications.

4.4k133.8M434](/packages/amphp-amp)[react/promise-timer

A trivial implementation of timeouts for Promises, built on top of ReactPHP.

34148.1M113](/packages/react-promise-timer)[react/socket

Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP

1.3k135.6M459](/packages/react-socket)[revolt/event-loop

Rock-solid event loop for concurrent PHP applications.

92553.8M226](/packages/revolt-event-loop)[react/dns

Async DNS resolver for ReactPHP

537133.1M104](/packages/react-dns)[amphp/parallel

Parallel processing component for Amp.

85251.9M98](/packages/amphp-parallel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
