PHPackages                             hhvm/asio-utilities - 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. hhvm/asio-utilities

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

hhvm/asio-utilities
===================

Utilities to make working with async functions easier

v2.4(10y ago)51.3k5BSD-3-Clause

Since Feb 21Pushed 10y ago7 watchersCompare

[ Source](https://github.com/hhvm/asio-utilities)[ Packagist](https://packagist.org/packages/hhvm/asio-utilities)[ Docs](https://github.com/hhvm/asio-utilities)[ RSS](/packages/hhvm-asio-utilities/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (1)Versions (9)Used By (0)

ASIO Utilities
==============

[](#asio-utilities)

Obsolete In HHVM 3.11+
----------------------

[](#obsolete-in-hhvm-311)

These functions have been merged into HHVM, and we expected them to be included from 3.11.0 onwards.

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

[](#installation)

- add `hhvm/asio-utilities` to your composer.json

ResultOrExceptionWrapper
------------------------

[](#resultorexceptionwrapper)

When awaiting multiple handles, it can be useful to isolate exceptions from each; ResultOrExceptionWrapper provides this:

```
// HH\Asio\wrap(T): Awaitable
$w = await wrap(some_async_function_that_may_throw());
if ($w->isSucceeded()) {
  $result = $w->getResult();
  ...
} else {
  $exception = $w->getException();
  ...
}
```

Mapping and Filtering Functions
-------------------------------

[](#mapping-and-filtering-functions)

HHVM 3.6 and above include HH\\Asio\\v() and HH\\Asio\\m() to make it easy to wait on multiple wait handles; it's fairly common to want to combine this with another option, such as mapping or filtering with an async function.

These functions are named according to their attributes:

First, how they take and return arguments according to types:

- v - Vector
- m - Map

Then, either one or two letters to indicate the operation:

- f - filter
- fk - filter with key
- m - map
- mk - map with keys

Finally, there is optionally a trailing 'w' to indicate that you want a result or exception wrapper. For 'fw' functions, the behavior is that:

- if the filter function returns true, the wrapped element is returned
- if the filter function returns false, the element is omitted
- if the filter function throws an exception, the wrapped exception is returned

This is also available without a filter or mapping operation - vw() and mw().

Function List
-------------

[](#function-list)

All functions are in the HH\\Asio namespace; `v()` and `m()` are built in to HHVM 3.6 and newer.

   Name Returns Mapped Filtered with key Wrapped Callback     v() Vector&lt;T&gt; ❌ ❌ ❌ ❌   vm() Vector&lt;Tr&gt; ✅ ❌ ❌ ❌ `(Tv): Awaitable`  vmk() Vector&lt;Tr&gt; ✅ ❌ ✅ ❌ `(Tk, Tv): Awaitable`  vf() Vector&lt;Tv&gt; ❌ ✅ ❌ ❌ `(Tv): Awaitable`  vfk() Vector&lt;Tv&gt; ❌ ✅ ✅ ❌ `(Tk, Tv): Awaitable`  vw() Vector&lt;ResultOrExceptionWrapper&lt;T&gt;&gt; ❌ ❌ ❌ ✅   vmw() Vector&lt;ResultOrExceptionWrapper&lt;Tr&gt;&gt; ✅ ❌ ❌ ✅ `(Tv): Awaitable`  vmkw() Vector&lt;ResultOrExceptionWrapper&lt;Tr&gt;&gt; ✅ ❌ ✅ ✅ `(Tk, Tv): Awaitable`  vfw() Vector&lt;ResultOrExceptionWrapper&lt;Tv&gt;&gt; ❌ ✅ ❌ ✅ `(Tv): Awaitable`  vfkw() Vector&lt;ResultOrExceptionWrapper&lt;Tv&gt;&gt; ❌ ✅ ✅ ✅ `(Tk, Tv): Awaitable`  m() Map&lt;Tk, Tv&gt; ❌ ❌ ❌ ❌   mm() Map&lt;Tk, Tr&gt; ✅ ❌ ❌ ❌ `(Tv): Awaitable`  mmk() Map&lt;Tk, Tr&gt; ✅ ❌ ✅ ❌ `(Tk, Tv): Awaitable`  mf() Map&lt;Tk, Tv&gt; ❌ ✅ ❌ ❌ `(Tv): Awaitable`  mfk() Map&lt;Tk, Tv&gt; ❌ ✅ ✅ ❌ `(Tk, Tv): Awaitable`  mw() Map&lt;Tk, ResultOrExceptionWrapper&lt;T&gt;&gt; ❌ ❌ ❌ ✅   mmw() Map&lt;Tk, ResultOrExceptionWrapper&lt;Tr&gt;&gt; ✅ ❌ ❌ ✅ `(Tv): Awaitable`  mmkw() Map&lt;Tk, ResultOrExceptionWrapper&lt;Tr&gt;&gt; ✅ ❌ ✅ ✅ `(Tk, Tv): Awaitable`  mfw() Map&lt;Tk, ResultOrExceptionWrapper&lt;Tv&gt;&gt; ❌ ✅ ❌ ✅ `(Tv): Awaitable`  mfkw() Map&lt;Tk, ResultOrExceptionWrapper&lt;Tv&gt;&gt; ❌ ✅ ✅ ✅ `(Tk, Tv): Awaitable`

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 81.6% 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

Every ~41 days

Recently: every ~36 days

Total

8

Last Release

3812d ago

Major Versions

v0.1 → v1.02015-05-21

v1.1 → v2.02015-07-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/66d33e29918fd8cc713997dbbe03cb86e2aefbdc6736637641cdffed2f22accb?d=identicon)[fredemmott](/maintainers/fredemmott)

---

Top Contributors

[![fredemmott](https://avatars.githubusercontent.com/u/360927?v=4)](https://github.com/fredemmott "fredemmott (31 commits)")[![asm89](https://avatars.githubusercontent.com/u/657357?v=4)](https://github.com/asm89 "asm89 (2 commits)")[![billf](https://avatars.githubusercontent.com/u/265988?v=4)](https://github.com/billf "billf (2 commits)")[![JoelMarcey](https://avatars.githubusercontent.com/u/3757713?v=4)](https://github.com/JoelMarcey "JoelMarcey (1 commits)")[![ptarjan](https://avatars.githubusercontent.com/u/40143?v=4)](https://github.com/ptarjan "ptarjan (1 commits)")[![sgolemon](https://avatars.githubusercontent.com/u/812538?v=4)](https://github.com/sgolemon "sgolemon (1 commits)")

---

Tags

asyncfacebookhhvmhackasio

### Embed Badge

![Health badge](/badges/hhvm-asio-utilities/health.svg)

```
[![Health](https://phpackages.com/badges/hhvm-asio-utilities/health.svg)](https://phpackages.com/packages/hhvm-asio-utilities)
```

###  Alternatives

[amphp/amp

A non-blocking concurrency framework for PHP applications.

4.4k123.4M323](/packages/amphp-amp)[react/socket

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

1.3k116.9M402](/packages/react-socket)[revolt/event-loop

Rock-solid event loop for concurrent PHP applications.

92343.6M138](/packages/revolt-event-loop)[amphp/parallel

Parallel processing component for Amp.

85046.2M74](/packages/amphp-parallel)[react/dns

Async DNS resolver for ReactPHP

536114.1M100](/packages/react-dns)[amphp/byte-stream

A stream abstraction to make working with non-blocking I/O simple.

393116.2M104](/packages/amphp-byte-stream)

PHPackages © 2026

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