added option to limit maximum concurrent processes