PHPackages                             innmind/async-operating-system - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. innmind/async-operating-system

Abandoned → [innmind/mantle](/?search=innmind%2Fmantle)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

innmind/async-operating-system
==============================

1.0.0(3y ago)0643MITPHPPHP ~8.1

Since Feb 11Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Innmind/async-operating-system)[ Packagist](https://packagist.org/packages/innmind/async-operating-system)[ Docs](http://github.com/innmind/async-operating-system)[ RSS](/packages/innmind-async-operating-system/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (10)Versions (3)Used By (0)

Async Operating System
======================

[](#async-operating-system)

[![Build Status](https://github.com/innmind/async-operating-system/workflows/CI/badge.svg?branch=main)](https://github.com/innmind/async-operating-system/actions?query=workflow%3ACI)[![codecov](https://camo.githubusercontent.com/80f98af8d94e187c420a81bd393a2e41678d47d10e3cd2a27a57ec518378d06f/68747470733a2f2f636f6465636f762e696f2f67682f696e6e6d696e642f6173796e632d6f7065726174696e672d73797374656d2f6272616e63682f646576656c6f702f67726170682f62616467652e737667)](https://codecov.io/gh/innmind/async-operating-system)[![Type Coverage](https://camo.githubusercontent.com/6416ca84d71060c4973e5757cbe62afb4de5cd9e39ba5d7ea9caf2631df1cfae/68747470733a2f2f73686570686572642e6465762f6769746875622f696e6e6d696e642f6173796e632d6f7065726174696e672d73797374656d2f636f7665726167652e737667)](https://shepherd.dev/github/innmind/async-operating-system)

Async implementation of [`innmind/operating-system`](https://packagist.org/packages/innmind/operating-system) to allow to switch to another task when doing any I/O of suspending the current process.

**Warning**: the following features are disabled in this async context :

- Process forking
- Handling signals

**Note**: SQL connections are not async yet.

Installation
------------

[](#installation)

```
composer require innmind/async-operating-system
```

Usage
-----

[](#usage)

```
use Innmind\Async\OperatingSystem\Factory;
use Innmind\OperatingSystem\Factory as Synchronous;
use Innmind\Filesystem\Name;
use Innmind\Http\{
    Message\Request\Request,
    Message\Method,
    ProtocolVersion,
};
use Innmind\Url\{
    Url,
    Path,
};
use Innmind\Mantle\{
    Source\Predetermined,
    Suspend,
    Forerunner,
};

$synchronous = Synchronous::build();
$factory = Factory::of($synchronous);
$source = Predetermined::of(
    static fn(Suspend $suspend) => $factory
        ->build($suspend)
        ->filesystem()
        ->mount(Path::of('somewhere/'))
        ->get(Name::of('some-file'))
        ->match(
            static fn($file) => doYourStuff($file),
            static fn() => null,
        ),
    static fn(Suspend $suspend) => $factory
        ->build($suspend)
        ->remote()
        ->http()(new Request(
            Url::of('https://wikipedia.org')
            Method::get,
            ProtocolVersion::v11,
        ))
        ->match(
            static fn($success) => doYourStuff($success),
            static fn() => null,
        );
);

Forerunner::of($synchronous->clock())(null, $source);
```

In this example we load a file and call wikipedia asynchronously, but you can use the `OperatingSystem` returned by `$factory->build($suspend)` like you would for its synchronous counterpart.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

1189d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/851425?v=4)[Baptiste Langlade](/maintainers/Baptouuuu)[@Baptouuuu](https://github.com/Baptouuuu)

---

Top Contributors

[![Baptouuuu](https://avatars.githubusercontent.com/u/851425?v=4)](https://github.com/Baptouuuu "Baptouuuu (21 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/innmind-async-operating-system/health.svg)

```
[![Health](https://phpackages.com/badges/innmind-async-operating-system/health.svg)](https://phpackages.com/packages/innmind-async-operating-system)
```

###  Alternatives

[pwm/datetime-period

An implementation of the datetime period type for working with temporal intervals

679.0k](/packages/pwm-datetime-period)

PHPackages © 2026

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