Giter VIP home page Giter VIP logo

errmux's Introduction

errmux

Concurrent error handling utilities for Go.

Description

errmux provides functions and data for working with concurrent error handling in a similar fashion to serial error handling. Unlike most error handling packages, errmux operates on channels of errors rather than errors themselves.

When a new Handler is created, errmux multiplexes all of its constituent error channel and passes the values to a Consumer for processing. All values on all error channels will be read - this is to prevent resource leaks due to blocking send operations upstream from a Handler. Errors will only be passed to a Consumer after reading if the following conditions apply:

  1. Consumer has not previously reported that it is closed (c.Consume(err) == false)
  2. Cancel has not been called on a Handler

If a Handler has been canceled, this does not guarantee further errors will not be read by the Handler. It does, however, guarantee errors will not be consumed by a Consumer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.