|
|
@ -33,8 +33,8 @@ func main() {
|
|
|
|
// Subscribe to SIGINT
|
|
|
|
// Subscribe to SIGINT
|
|
|
|
manager.SubscribeTo(os.Interrupt)
|
|
|
|
manager.SubscribeTo(os.Interrupt)
|
|
|
|
|
|
|
|
|
|
|
|
// NewWorker returns a type implementing WorkUnit interface
|
|
|
|
// NewWorker returns a type implementing WorkUnit interface unit :=
|
|
|
|
unit := NewWorker()
|
|
|
|
NewWorker()
|
|
|
|
|
|
|
|
|
|
|
|
// Register the unit with the manager
|
|
|
|
// Register the unit with the manager
|
|
|
|
manager.AddUnit(scheduler)
|
|
|
|
manager.AddUnit(scheduler)
|
|
|
|