cap number of concurrent threads