Help with communication to UI thread from non-UI, non-processing thread

I have a view where I spin up a thread where I do opengl processing. I would like to communicate from this thread back to the UI thread.

If I understand correctly IConnectionPoint is used by the host for communication between processor and controller and doesn’t apply in this situation.

I found a Timer class in the sdk source, which would work for me assuming it get’s called on the UI thread and then I can periodically check a message queue, but I can’t find it on https://steinbergmedia.github.io/vst3_doc/vstsdk/index.html so I am unsure if this is intended to be used.

Would the timer be the way to go or is there a better way?

As clarification I should maybe mention this is all on the controller side of course.

The timer class can only be used from the UI thread and will fire on the UI thread.

1 Like