Skip to content

akramarenkov/breaker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Breaker

Go Reference Go Report Card codecov

Purpose

Library that allows you to break goroutine and wait it completion

Usage

Example:

package main

import (
    "fmt"

    "github.com/akramarenkov/breaker/breaker"
)

func main() {
    breaker := breaker.New()

    go func() {
        defer breaker.Complete()

        _, opened := <-breaker.IsBreaked()

        fmt.Println(opened)
    }()

    breaker.Break()

    // Output:
    // false
}

About

Library that allows you to break goroutine and wait it completion

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages