# Does suspendProcessing blocks until active processing is finished?

**URL:** <https://forum.juce.com/t/does-suspendprocessing-blocks-until-active-processing-is-finished/15060>\
**Category:** Audio Plugins\
**Created:** [June 30, 2015, 10:40pm UTC](https://forum.juce.com/t/does-suspendprocessing-blocks-until-active-processing-is-finished/15060 "2015-06-30T22:40:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![WilliamR](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/williamr/32/72_2.png) [@WilliamR](https://forum.juce.com/u/WilliamR)\
**Post date:** [June 30, 2015, 10:40pm UTC](https://forum.juce.com/t/does-suspendprocessing-blocks-until-active-processing-is-finished/15060/1 "2015-06-30T22:40:48Z")

</div>

Hi,&nbsp;  
  
I've managed it to put the question in the title. ;)  
I understand that AudioProcessor::suspendProcessing will block any callback calls, however, I am not sure what happens with current callbacks. Will suspendProcessing block until the current callback is done, if there is any?  
  
Thanks!

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [July 1, 2015, 6:04am UTC](https://forum.juce.com/t/does-suspendprocessing-blocks-until-active-processing-is-finished/15060/2 "2015-07-01T06:04:29Z")

</div>

yes, because suspendProcessing&nbsp;&nbsp;uses the callback-Lock to activate the suspend-processing. Its the wrappers reponsibilty to use the lock while the&nbsp;&nbsp;callback happens&nbsp;and check its suspend-status.

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![WilliamR](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/williamr/32/72_2.png) [@WilliamR](https://forum.juce.com/u/WilliamR)\
**Post date:** [July 1, 2015, 3:10pm UTC](https://forum.juce.com/t/does-suspendprocessing-blocks-until-active-processing-is-finished/15060/3 "2015-07-01T15:10:43Z")

</div>

So I can call suspendProcessing in the GUI-Thread and the call (suspendProcessing(true)) will return when no processing is active, right? I have issues understanding things like this with my english skills, which is why I am asking again. :'D&nbsp;  
  
Cheers

---

<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:** [July 1, 2015, 3:43pm UTC](https://forum.juce.com/t/does-suspendprocessing-blocks-until-active-processing-is-finished/15060/4 "2015-07-01T15:43:35Z")

</div>

Yes, that's right!
