diff options
author | Valery Piashchynski <[email protected]> | 2021-02-08 00:23:14 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-02-08 00:23:14 +0300 |
commit | d353bc5f0be991ad44208e48ed04dc61ee53c340 (patch) | |
tree | 4ac78a7219e03aaf31af042581109dc3c9ab84f6 /pkg/worker_watcher/stack.go | |
parent | ae8af5413143636d5fe52ddaffa5d9122681bc20 (diff) |
Rewrite stack.Get operation w/o recursion calls
Add fast and slow paths
Diffstat (limited to 'pkg/worker_watcher/stack.go')
-rw-r--r-- | pkg/worker_watcher/stack.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/worker_watcher/stack.go b/pkg/worker_watcher/stack.go index 51c3d016..9a0bc6a4 100644 --- a/pkg/worker_watcher/stack.go +++ b/pkg/worker_watcher/stack.go @@ -89,6 +89,7 @@ func (stack *Stack) Workers() []worker.SyncWorker { defer stack.mutex.Unlock() workersCopy := make([]worker.SyncWorker, 0, 1) // copy + // TODO pointers, copy have no sense for _, v := range stack.workers { if v != nil { workersCopy = append(workersCopy, v) |