Skip to content

sdeoras/dispatcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dispatcher

about

dispatcher is a function scheduler that dispatches a limited number of functions and keeps rest of the functions in a list for dispatching later.

use

import pkg

import github.com/sdeoras/dispatcher

dispatch function

d := dispatcher.New(5) // dispatch a max of 5 functions concurrently
d.Do(func(){
	fmt.Println("dispatched")
})

wait for completion

for d.IsRunning() {
	time.Sleep(time.Second)
}

About

a golang function scheduler and dispatcher

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages