diff --git a/pkg/services/object/put/service.go b/pkg/services/object/put/service.go index 9ef33661..92c45f36 100644 --- a/pkg/services/object/put/service.go +++ b/pkg/services/object/put/service.go @@ -60,8 +60,8 @@ type cfg struct { func defaultCfg() *cfg { return &cfg{ - remotePool: new(util.SyncWorkerPool), - localPool: new(util.SyncWorkerPool), + remotePool: new(util.PseudoWorkerPool), + localPool: new(util.PseudoWorkerPool), log: zap.L(), } } diff --git a/pkg/util/worker_pool.go b/pkg/util/worker_pool.go index 3083cf06..9bf455f4 100644 --- a/pkg/util/worker_pool.go +++ b/pkg/util/worker_pool.go @@ -11,13 +11,13 @@ type WorkerPool interface { Submit(func()) error } -// SyncWorkerPool represents synchronous worker pool. -type SyncWorkerPool struct{} +// PseudoWorkerPool represents pseudo worker pool which executes submitted job immediately in the caller's routine.. +type PseudoWorkerPool struct{} // Submit executes passed function immediately. // // Always returns nil. -func (SyncWorkerPool) Submit(fn func()) error { +func (PseudoWorkerPool) Submit(fn func()) error { fn() return nil