Closed andersjel closed 7 years ago
Good point. It would be nice if we could solve this without needing an ugly hack like an artificial delay.
I'll have to think a bit more about the asynchronous interface.
Implemented in 828817f8a567d86a380ff277f94a6d8390cd4d7a. I used the async package which provides a good interface for this use case.
At the moment, it is hard to know when the thread spawned by startProgress is done printing. This makes it difficult to put a newline after the last line and do any additional output. Right now, one has to introduce an artificial delay or live with the race condition.