cli_repl icon indicating copy to clipboard operation
cli_repl copied to clipboard

Breaking out of async loop does not immediately exit the loop

Open renatoathaydes opened this issue 6 years ago • 0 comments

Hi! Thanks for writing this, it's just what I needed!

There's just one issue I found...

Running this code:

await for (var line in repl.runAsync()) {
    print("you typed $line");
    break;
}
print("Bye");

When I type something, I would expect it to exit immediatelly after I hit Enter, but it doesn't, it prints the prompt again, then the next time I hit Enter it finally exits.

Would be nice if it could break first time.

Thanks!

renatoathaydes avatar Aug 27 '19 19:08 renatoathaydes