I experimented with something similar (separate threads to process responses), but what I found is that sometimes I wanted the response to be processed before the next action -- and you gain pretty little on processing the response in another thread
in my instances/uses. However, that is an excellent pattern whenever the processing of the response is independent of other actions and/or can take a while. Depends on the plugin / hardware / design I guess...
I create one thread per device so that one device's slowdown or error cannot effect other devices; all communication is done on the device's individual thread. I then use the runConcurrentThread loop is used for plugin-level actions which have their own queue. For instance, the update check is done here.
All are perfectly valid patterns, somewhat plugin dependent and someone preference of the programmer. I believe for this sample, though, may just use one queue and do processing in the runConcurrentThread. Thinking when you are getting to what we are talking about here, you know enough to be able to manage multiple threads w/o the use of the plugin sample!
