How to change the priority of resized() and timer?

In my plug in I have a lamp class where i set a timer interval value and make a blinking led animation by drawing 14 images. it works fine unless i try to resize the plugin window. When i try to resize the window, animation slows down. Looks like resized() method has a higher priority than my lamp’s timercallback method. So while i am resizing the window, timercallback doesn’t work till i stop resizing. How can I change the priority of resized() (but of course if this is the right way to do this, please let me know if it is not.) and let it to call timercallback of my lamp.

I found

  Process::setPriority(Process::HighPriority); 

and

  Thread::setPriority(int priority); 

methods that i think might help me but i am not sure about how to use them properly. I don’t want to cause something worse(like glitching ) while trying to fix this issue. Could you please give me a short info about this issue and the way these methods should be used? I checked the API and the way API explains these methods is not enough for me to understand it properly. I am still trying to learn Juce environment and audio effects.
Thank you :pray:

resized() and timerCallback are both called on the Message Thread. they’re not running on their own threads that you can adjust the priority.

Thanks for your answer. So how can i fix this issue?

Ask your customers if it’s a deal breaker for them with regard to buying your plugin or not.

“Hey, If the animation stutters when you resize the window, will that make you not buy my plugin?”

it makes sense :slight_smile: thank you for answering again :pray: