kraken: don't use a thread for reading input
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
7c2a25a6b0
commit
f8558238bf
|
@ -43,17 +43,13 @@ int main(int argc, char** argv) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
auto reader = std::jthread([&]() {
|
for (std::string line; std::getline(std::cin, line);) {
|
||||||
for (std::string line; std::getline(std::cin, line);) {
|
auto const order = kraken::parse::parse_single_order(
|
||||||
auto const order = kraken::parse::parse_single_order(
|
kraken::csv::read_csv_line(line));
|
||||||
kraken::csv::read_csv_line(line));
|
while (!pending_orders.push(order)) {
|
||||||
while (!pending_orders.push(order)) {
|
// FIXME: busy wait
|
||||||
// FIXME: busy wait
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// EOF, bring process orders and bring
|
}
|
||||||
writer.request_stop();
|
// EOF, process orders and bring down
|
||||||
});
|
writer.request_stop();
|
||||||
|
|
||||||
reader.join();
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue