made the input thread capable of serving multiple clients, as needed for multi-gpu support