An open API service indexing awesome lists of open source software.

https://github.com/ozgio/iopipe

Provides the function Parallel to create a synchronous in memory pipe and lets you write to and read from the pipe parallelly.
https://github.com/ozgio/iopipe

Last synced: 2 months ago
JSON representation

Provides the function Parallel to create a synchronous in memory pipe and lets you write to and read from the pipe parallelly.

Awesome Lists containing this project

README

          

# Parallel IO Pipe

iopipe provides the function Parallel to create a synchronous in memory pipe and lets you write to
and read from the pipe parallely.

## Usage

```go
// Writes `Hello world` to standard output
err := iopipe.Parallel(context.Background(), func(ctx context.Context, w io.Writer) error {
_, err := fmt.Fprint(w, "Hello World")
return err
}, func(ctx context.Context, r io.Reader) error {
_, err := io.Copy(os.Stdout, pr)
return err
})
```