File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
ydb/public/lib/ydb_cli/commands Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -64,13 +64,12 @@ int TWorkloadCommandImport::TUploadCommand::DoRun(NYdbWorkload::IWorkloadQueryGe
64
64
const auto start = Now ();
65
65
Cout << " Fill table " << dataGen->GetName () << " ..." << Endl;
66
66
Bar = MakeHolder<TProgressBar>(dataGen->GetSize ());
67
- TVector<NThreading::TFuture<void >> sendings;
68
67
for (ui32 t = 0 ; t < UploadParams.Threads ; ++t) {
69
- sendings. push_back ( NThreading::Async ([this , dataGen] () {
68
+ pool. SafeAddFunc ([this , dataGen] () {
70
69
ProcessDataGenerator (dataGen);
71
- }, pool) );
70
+ });
72
71
}
73
- NThreading::WaitAll (sendings). Wait ();
72
+ pool. Stop ();
74
73
const bool wereErrors = AtomicGet (ErrorsCount);
75
74
with_lock (Lock) {
76
75
Cout << " Fill table " << dataGen->GetName () << " " << (wereErrors ? " Failed" : " OK" ) << " " << Bar->GetCurProgress () << " / " << Bar->GetCapacity () << " (" << (Now () - start) << " )" << Endl;
@@ -79,6 +78,7 @@ int TWorkloadCommandImport::TUploadCommand::DoRun(NYdbWorkload::IWorkloadQueryGe
79
78
break ;
80
79
}
81
80
}
81
+ TableClient->Stop ();
82
82
return AtomicGet (ErrorsCount) ? EXIT_FAILURE : EXIT_SUCCESS;
83
83
}
84
84
class TWorkloadCommandImport ::TUploadCommand::TDbWriter: public IWriter {
You can’t perform that action at this time.
0 commit comments