The Trade Desk Interview Question

How would you add multi-threading to this program?