https://github.com/aloknerurkar/task-runner
Async task runner in go
https://github.com/aloknerurkar/task-runner
golang worker-queue
Last synced: 10 months ago
JSON representation
Async task runner in go
- Host: GitHub
- URL: https://github.com/aloknerurkar/task-runner
- Owner: aloknerurkar
- License: mit
- Created: 2017-04-30T13:45:45.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-22T07:36:14.000Z (over 8 years ago)
- Last Synced: 2025-01-29T10:32:11.984Z (12 months ago)
- Topics: golang, worker-queue
- Language: Go
- Size: 10.7 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# task-runner
As the name suggests, this library provides concurrent task execution.
I recently found an article, explaining a design of Worker Queue implementation in Go.
http://nesv.github.io/golang/2014/02/25/worker-queues-in-go.html
I would suggest going through the article first. Also the article mentions about some videos you can watch,
which explain concurrency patterns in Go. I would suggest going through that as well.
I wanted to create a library out of this, so that I can use it everywhere.
For example usage you can go through the
/example/examples.go
Basically this TaskRunner provides two interfaces to run Tasks.
Task type is pretty much anything that has a Execute() routine. Tasks have to be structured this way.
The first interface is free is a simple function call interface.
The second is the channel interface.
Some basic tests can be found in the test/ dir as well as the main pkg.