limit number of threads created on client