Running same test on multiple devices in parallel

Does anybody have a code sample (pseudo code is fine too) on how to run same test on multiple devices in parallel? I’m aware of the required capabilities setup and also how to launch Appium server on different ports. I’m just not sure how to handle multiple webdriver instances.

Would it require some asynchronous loop logic or is there a better way?

@finspin hope this helps