safe

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadWriter

func ReadWriter(rw io.ReadWriter) io.ReadWriter

ReadWriter is a io.ReadWriter that uses a mutex to lock reads/writes, so they don't happen concurrently. It can be used to wrap an unsafe ReadWriter.

func Reader

func Reader(r io.Reader) io.Reader

Reader is a io.Reader that uses a mutex to lock reads, so they it can be called concurrently. It can be used to wrap an unsafe Reader.

func Writer

func Writer(w io.Writer) io.Writer

Writer is a io.Writer that uses a mutex to lock writes, so they it can be called concurrently. It can be used to wrap an unsafe Writer.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL