Trouble with UI update during a loop

No. I saw the word ‘thread’ and thought you meant a sub-thread.