Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Kaburaya Build Status

WIP.

Kaburaya optimize the number of goroutines by feedback control. It provides elastic semaphore.

Usage

sem := kaburaya.NewSem(100*time.Millisecond, 0.1)
var wg sync.WaitGroup
for // Something condition {
	wg.Add(1)
	sem.Wait()
	go func() {
		defer sem.Signal()
		defer wg.Done()
		// Something job
	}()
}
wg.Wait()
sem.Stop()

License

MIT

Author

monochromegane

About

Kaburaya optimize the number of goroutines by feedback control.

Resources

License

Releases

No releases published

Packages

No packages published

Languages