AuburnSounds / Dplug

Audio plugin framework. VST2/VST3/AU/AAX/LV2 for Linux/macOS/Windows.
https://dplug.org/
Other
484 stars 32 forks source link

Considering detaching threads exiting callbacks #118

Closed p0nce closed 8 years ago

p0nce commented 8 years ago

The benefit would be that they won't be able to be stopped by the GC later. and solving #110 for Cubase

The downside is the calls to thread_attachThis() / thread_detachThis() which is an overhead.

p0nce commented 8 years ago

Anyway doing a RAII struct for callbacks would be very helpful because right now it's a bit all over the place in dplug:au, dplug:vst and dplug:window, each callback being different. But some callbacks are "dominated" by others too (runtime is already initialized), or don't need thread attachment.

p0nce commented 8 years ago

OK, looks way better now. But detaching the threads uncovers another bug :)