prevent to run too much threads