refactoring

This commit is contained in:
Chris Lu
2021-04-02 01:10:24 -07:00
parent cc0df36a9e
commit 7e8edc3c4a
4 changed files with 64 additions and 91 deletions

View File

@@ -77,7 +77,7 @@ type WFS struct {
signature int32
// throttle writers
concurrentWriters *util.LimitedConcurrentExecutor
concurrentWriters *util.LimitedOutOfOrderProcessor
Server *fs.Server
}
type statsCache struct {
@@ -135,7 +135,7 @@ func NewSeaweedFileSystem(option *Option) *WFS {
wfs.fsNodeCache = newFsCache(wfs.root)
if wfs.option.ConcurrentWriters > 0 {
wfs.concurrentWriters = util.NewLimitedConcurrentExecutor(wfs.option.ConcurrentWriters)
wfs.concurrentWriters = util.NewLimitedOutOfOrderProcessor(int32(wfs.option.ConcurrentWriters))
}
return wfs