release the thread after processing each input-queue message