AHK_X11
AHK_X11 copied to clipboard
Loop isn't thread-safe
e.g.
settimer, loop, 500
loop:
loop
{
sleep 100
echo %a_index%
if a_index > 10
break
}
prints
1
2
3
4
0
0
0
0
0
0
...
because the two loop invocations have shared state and counters and it's pure chaos