---
name: "Future::IO::ImplBase"
section: "3pm"
platform: "linux"
package: "libfuture-io-perl"
version: "0.16-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Future::IO::ImplBase"
---

# Future::IO::ImplBase(3pm)

base class for "Future::IO" implementations

## NAME

"Future::IO::ImplBase" - base class for "Future::IO" implementations

## DESCRIPTION

This package provides a few utility methods that may help writing actual Future::IO implementation classes. It is entirely optional; implementations are not required to use it.

## CLASS METHODS

### APPLY

```
   __PACKAGE__->APPLY;
```

Attempts to set the value of the `$Future::IO::IMPL` variable to the name of the calling package.

## DEFAULT METHODS

These methods are provided based on lower-level functionality that the implementing class should provide.

### accept

Implemented by wrapping `"ready_for_read"`, as "sysread" uses.

### alarm

Implemented by wrapping `"sleep"`.

### connect

Implemented by wrapping `"ready_for_write"`, as "syswrite" uses.

### sysread

Requires a lower-level method

```
   $f = $class->ready_for_read( $fh );
```

which should return a Future that completes when the given filehandle may be ready for reading.

### syswrite

Requires a lower-level method

```
   $f = $class->ready_for_write( $fh );
```

which should return a Future that completes when the given filehandle may be ready for writing.

## AUTHOR

Paul Evans \<leonerd@leonerd.org.uk\>
