()
| 13 | } |
| 14 | |
| 15 | func (svc *ExampleService) Start() { |
| 16 | // launch two background goroutines |
| 17 | svc.gorogrp.Go(svc.backgroundLoop1) |
| 18 | svc.gorogrp.Go(svc.backgroundLoop2) |
| 19 | } |
| 20 | |
| 21 | func (svc *ExampleService) Stop() { |
| 22 | // stop all goroutines in the goro.Group |