diff options
author | Wolfy-J <[email protected]> | 2018-04-15 12:48:53 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2018-04-15 12:48:53 +0300 |
commit | 16fdc1e896278bf64550d508063d4cdf77409941 (patch) | |
tree | 76db075971f2fe683ed3bf643bbf097b47178a5a /pool.go | |
parent | ca63ec7aec2d7ba5d107d54091489612e4b12dc5 (diff) | |
parent | e2c1c66d7a35a9c60a4f05126691242068ebb589 (diff) |
Merge pull request #6 from spiral/develop
Develop
Diffstat (limited to 'pool.go')
-rw-r--r-- | pool.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -13,9 +13,15 @@ const ( // Pool managed set of inner worker processes. type Pool interface { + // Report attaches pool event watcher. + Watch(o func(event int, w *Worker, ctx interface{})) + // Exec one task with given payload and context, returns result or error. Exec(rqs *Payload) (rsp *Payload, err error) + // Workers returns worker list associated with the pool. + Workers() (workers []*Worker) + // Destroy all underlying workers (but let them to complete the task). Destroy() } |