Skip to content

Breaking out of async loop does not immediately exit the loop #2

Description

@renatoathaydes

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions