I’m making huge steps understanding juce - unfortunally I got to a point where I need help again.
I’m working on a vst-plugin that connects to different udp-devices to collect data from them. When I look at the DatagramSocket, it seems like there’s no way around polling… So my idea was to spawn a thread for each device (= for each datagram socket) and poll for new data. New data would have to be inserted into a lock free linked list or similar. Then I would need another thread to go through all these lists of all devices and again collect the data to distribute it to the rest of my application.
So overall for say 6 devices I would spawn at least 7 threads. I’m not familar with multi-threading so far, but intuition tells me, that there must be a better solution than having so many thread simply waiting for something (= wasting CPU [?] )
Thanks for any hints,