qri-io / qri

you're invited to a data party!
https://qri.io
GNU General Public License v3.0
1.11k stars 66 forks source link

fix(automation): Print synchronously, keep output in order #1937

Closed dustmop closed 3 years ago

dustmop commented 3 years ago

Before this change, print would be dispatched asynchronously. Since go routines can start running at any time based upon what the scheduler decides, this would cause print statements to output in arbitrary orders. For example this expected output:

0: 1
1: 2
2: 3
3: 4
4: 35

would instead show up like this (as an example):

1: 2
0: 1
3: 4
4: 35
2: 3