Hmm... so you inserted a watchdog sort of thing into the loop, in case StdoutRead does not give @error when it should. Nice idea. However, when I run it, it just freezes again instead of giving the $y=500001 outputs. AutoIT does not accumulate any cycles when I check in Process Hacker, meaning it's not stuck in a loop, but an actual deadlock.
@TheXman, your example works just fine for most applications, but the point of my original post was to demonstrate that AutoIT freezes when calling StdoutRead in a loop. Calling StdoutRead in a loop is mentioned as good practice in the help file, so it should not cause the runtime to deadlock.
Furthermore, as you mentioned, there might be reasons to "stream" the output to the host application continuously. I currently build such an application and stumbled upon this bug, then constructed the minimal example to isolate the issue.
I might not have made this clear in my original post, if so, I'm sorry
This was meant to be a bug report, kind of. Is there a better way of reporting this issue to the devs?
I'm still interested in any intermediate workarounds that call StdoutRead repeatedly without freezing though
cheers