Plugin processBlock block daw

Hi,

I notice that if my processBlock is too heavy for the current samplePerBlock there’s the risk to block the daw processing… how can I avoid this ?

I mean for example in main stage I notice that if the process is too heavy it creates a lot of glitches trying during the time but it doesn’t block the process, while for example in cubase the processBlock makes the daw not responding.

I know that the point is “Main Stage” works like this and “Cubase” like that, but my plugin is basically a graph that can incapsulate third party vst and audioUnit, so my question is, which could be the best approach to get in my plugin a behavior like main stage and not like cubase ? (so avoid cubase to block all and manage the heaviness of process safety in my plugin).

Really thank you!