drop checkInterrupt from ThreadPool items
all of them block on a promise very soon after starting. only queryValidPaths needs to make sure not to swallow Interrupted exceptions to exit quickly instead of trying all paths first. Change-Id: I4f99f5d75d7057bad109dc0131aa58e84275e362
This commit is contained in:
@@ -226,8 +226,6 @@ try {
|
||||
std::string member,
|
||||
std::string key,
|
||||
std::string target) {
|
||||
checkInterrupt();
|
||||
|
||||
JSON json;
|
||||
json["archive"] = target;
|
||||
json["member"] = member;
|
||||
|
||||
@@ -760,8 +760,6 @@ try {
|
||||
ThreadPool pool{"queryValidPaths pool"};
|
||||
|
||||
auto doQuery = [&](AsyncIoRoot & aio, const StorePath & path) {
|
||||
checkInterrupt();
|
||||
|
||||
bool exists = false;
|
||||
std::exception_ptr newExc{};
|
||||
|
||||
@@ -769,6 +767,8 @@ try {
|
||||
aio.blockOn(queryPathInfo(path));
|
||||
exists = true;
|
||||
} catch (InvalidPath &) {
|
||||
} catch (Interrupted &) {
|
||||
throw;
|
||||
} catch (...) {
|
||||
newExc = std::current_exception();
|
||||
}
|
||||
|
||||
@@ -46,9 +46,6 @@ struct CmdCopySigs : StorePathsCommand
|
||||
std::atomic<size_t> added{0};
|
||||
|
||||
auto doPath = [&](AsyncIoRoot & aio, const Path & storePathS) {
|
||||
|
||||
checkInterrupt();
|
||||
|
||||
auto storePath = store->parseStorePath(storePathS);
|
||||
|
||||
auto info = aio.blockOn(store->queryPathInfo(storePath));
|
||||
@@ -124,9 +121,6 @@ struct CmdSign : StorePathsCommand
|
||||
std::atomic<size_t> added{0};
|
||||
|
||||
auto doPath = [&](AsyncIoRoot & aio, const Path & storePathS) {
|
||||
|
||||
checkInterrupt();
|
||||
|
||||
auto storePath = store->parseStorePath(storePathS);
|
||||
|
||||
auto info = aio.blockOn(store->queryPathInfo(storePath));
|
||||
|
||||
+3
-3
@@ -86,8 +86,6 @@ struct CmdVerify : StorePathsCommand
|
||||
|
||||
auto doPath = [&](AsyncIoRoot & aio, const StorePath & storePath) {
|
||||
try {
|
||||
checkInterrupt();
|
||||
|
||||
MaintainCount<std::atomic<size_t>> mcActive(active);
|
||||
update();
|
||||
|
||||
@@ -145,7 +143,9 @@ struct CmdVerify : StorePathsCommand
|
||||
if (validSigs >= actualSigsNeeded) break;
|
||||
try {
|
||||
auto info2 = aio.blockOn(store2->queryPathInfo(info->path));
|
||||
if (info2->isContentAddressed(*store)) validSigs = ValidPathInfo::maxSigs;
|
||||
if (info2->isContentAddressed(*store)) {
|
||||
validSigs = ValidPathInfo::maxSigs;
|
||||
}
|
||||
doSigs(info2->sigs);
|
||||
} catch (InvalidPath &) {
|
||||
} catch (Error & e) {
|
||||
|
||||
Reference in New Issue
Block a user