# AudioProcessor::get/setStateInformation thread

**URL:** <https://forum.juce.com/t/audioprocessor-get-setstateinformation-thread/13465>\
**Category:** Audio Plugins\
**Created:** [August 31, 2014, 2:50pm UTC](https://forum.juce.com/t/audioprocessor-get-setstateinformation-thread/13465 "2014-08-31T14:50:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eastman](https://avatars.discourse-cdn.com/v4/letter/e/2bfe46/32.png) [@eastman](https://forum.juce.com/u/eastman)\
**Post date:** [August 31, 2014, 2:50pm UTC](https://forum.juce.com/t/audioprocessor-get-setstateinformation-thread/13465/1 "2014-08-31T14:50:51Z")

</div>

Do these methods run on the same thread as the processBlock? Should they&nbsp;suspendProcessing if they're time consuming?

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [August 31, 2014, 3:30pm UTC](https://forum.juce.com/t/audioprocessor-get-setstateinformation-thread/13465/2 "2014-08-31T15:30:55Z")

</div>

They could be run on any thread, so yes, you may want to suspend the processing while they run, depending on what your implementation needs to do.

---

<div class="post-metadata">

**Author:** ![BobBrownConsulting](https://avatars.discourse-cdn.com/v4/letter/b/7ab992/32.png) [@BobBrownConsulting](https://forum.juce.com/u/BobBrownConsulting)\
**Post date:** [July 7, 2016, 11:12pm UTC](https://forum.juce.com/t/audioprocessor-get-setstateinformation-thread/13465/3 "2016-07-07T23:12:38Z")

</div>

Following up on this older thread…

In the case of an AAX plug-in, I see setStateInformation being called from the AAXH\_HighPriorityAAXHMixerRampeUpdateThread.

In the JuceDemoPlugin (Juce 3.0.1), I see that gain and delay (of type float) are being set here. Both gain and delay are read from the JuceDemoPluginAudioProcessorEditor::timerCallback which will be called on the main thread.

Wouldn’t there be a race condition since float is not an atomic type?

How do other plug-in developers deal with thread safety issues of data being set in setStateInformation and read in other threads?
