AuburnSounds / Dplug

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

Do we need a blocking message queue on overflow in VST wrapper? #4

Closed p0nce closed 9 years ago

p0nce commented 10 years ago

Currently lock-free, but maybe it should block instead of crashing when overflowing.

p0nce commented 10 years ago

Possibly at least 3 thread: audio thread, parameter threads, UI threads .

p0nce commented 10 years ago

Remaining problems:

p0nce commented 9 years ago

tryLock should be used, since the GC could possibly halt all threads, even the thread pushing on the FIFO while the spinlock is taken. That is a risk.

p0nce commented 9 years ago

Since mutexes and semaphore are lock-free in the uncontended case, I don't think it would be so bad to use a locked queue instead. gfm.core queues can continue to use GC memory since UI threads (producers) are GC-enabled.

p0nce commented 9 years ago

There is currently a strange crash when multiple instancess, Mago says an exception is thrown but seems a bit random.

p0nce commented 9 years ago

Blocking message queue available with a version. The annoying thing is that the sync primitives might throw and that makes the mutexes and semaphore functions non-@nogc.