9REPL::REPL(std::string prompt) : fInput(
""), fPrompt(prompt), fContinue(true), fNextLine(true)
12 fThread = std::thread([&]() {
17 while (fContinue.load()) {
18 while (std::cin.peek() == EOF) {
19 std::this_thread::yield();
21 keypress = std::cin.get();
22 if (keypress ==
'\n') {
27 if (!fContinue.load()) {
30 while (fContinue.load() && !fNextLine.load()) {
31 std::this_thread::yield();
33 if (!fContinue.load()) {
39 fNextLine.store(
false);
41 }
while (fContinue.load());