forked from TrueCloudLab/frostfs-node
[#674] util: Rename SyncWorkerPool with PseudoWorkerPool
`SyncWorkerPool` name is more appropriate for worker pool of size 1. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
43ccab3294
commit
07130855aa
2 changed files with 5 additions and 5 deletions
|
@ -60,8 +60,8 @@ type cfg struct {
|
||||||
|
|
||||||
func defaultCfg() *cfg {
|
func defaultCfg() *cfg {
|
||||||
return &cfg{
|
return &cfg{
|
||||||
remotePool: new(util.SyncWorkerPool),
|
remotePool: new(util.PseudoWorkerPool),
|
||||||
localPool: new(util.SyncWorkerPool),
|
localPool: new(util.PseudoWorkerPool),
|
||||||
log: zap.L(),
|
log: zap.L(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,13 +11,13 @@ type WorkerPool interface {
|
||||||
Submit(func()) error
|
Submit(func()) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// SyncWorkerPool represents synchronous worker pool.
|
// PseudoWorkerPool represents pseudo worker pool which executes submitted job immediately in the caller's routine..
|
||||||
type SyncWorkerPool struct{}
|
type PseudoWorkerPool struct{}
|
||||||
|
|
||||||
// Submit executes passed function immediately.
|
// Submit executes passed function immediately.
|
||||||
//
|
//
|
||||||
// Always returns nil.
|
// Always returns nil.
|
||||||
func (SyncWorkerPool) Submit(fn func()) error {
|
func (PseudoWorkerPool) Submit(fn func()) error {
|
||||||
fn()
|
fn()
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in a new issue