MCPcopy Create free account
hub / github.com/deepseek-ai/3FS / run

Method run

src/client/cli/admin/ScanTree.cc:60–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 path_(path) {}
59
60 CoTryTask<std::vector<BrokenPath>> run(size_t threads, size_t coroutines) {
61 auto result = co_await meta_.stat(user_, path_.parent, path_.path, false);
62 CO_RETURN_AND_LOG_ON_ERROR(result);
63 enqueue({"", {}, *result});
64
65 auto exec = std::make_unique<folly::CPUThreadPoolExecutor>(threads);
66 std::vector<folly::SemiFuture<folly::Unit>> workers;
67 while (workers.size() < coroutines) {
68 workers.push_back(worker().scheduleOn(exec.get()).start());
69 }
70
71 while (pending_) {
72 co_await folly::coro::sleep(std::chrono::milliseconds(100));
73 }
74 cancel_.requestCancellation();
75 for (auto &worker : workers) {
76 worker.wait();
77 }
78
79 co_return broken_.withWLock([](auto &broken) { return std::exchange(broken, {}); });
80 }
81
82 private:
83 struct Task {

Callers 11

handleDumpSessionFunction · 0.45
handleFunction · 0.45
handleMethod · 0.45
handleMethod · 0.45
handleMethod · 0.45
handleMethod · 0.45
handleMethod · 0.45
handleMethod · 0.45
scanTreeFunction · 0.45
handleInitFileSystemFunction · 0.45
handleInitConfigFunction · 0.45

Calls 7

push_backMethod · 0.80
requestCancellationMethod · 0.80
statMethod · 0.45
sizeMethod · 0.45
startMethod · 0.45
getMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected