NSProgressIndicator on modal window from secondary thread in Big Sur

Hello,

I have a determinated NSProgressIndicator located on modal window (runModalForWindow or beginModalSessionForWindow). I run it on a secondary thread using dispatch_get_main_queue.
On Mojave It works correctly.
On Big Sur I see a strange behavior: the progress bar moves only once and don't move after that. In debug, I can see that doubleValue is changes normally. All others
controls on this window seems run correctly.
When I run this in ordinary window (makeKeyAndOrderFront) or initially running in main
queue, everything works correctly.
 
Thus, the problem always occurs in Big Sur, only with determinated NSProgressIndicator located on modal window, running in non-UI thread.

What I do wrong?
Is it correct to run modal window from non UI thread?

Answered by AlekseyL in 662357022
After huge time spended on this issue, wrote on forum... And after that, solved the problem in few minutes.

_progressView.usesThreadedAnimation = NO;

works for me.
Accepted Answer
After huge time spended on this issue, wrote on forum... And after that, solved the problem in few minutes.

_progressView.usesThreadedAnimation = NO;

works for me.
Enable the "Main Thread Checker" and see if you are calling some AppKit methods from the wrong thread.
"Main Thread Checker" is already enabled and it doesn't help. I guess, somewhere inside NSProgressIndicator realy works secondary thread. That's why, I think, usesThreadedAnimation = NO is helps.
NSProgressIndicator on modal window from secondary thread in Big Sur
 
 
Q