Add thread management. One thread per market.