def semaphore = createSemaphore permit:7
def s = [:]
for(int i = 0; i < 100; i ++)
{
def id="${i}"
s.put("semaphore" + id, { -> acquireSemaphore (semaphore){
sleep time:100,unit:"MILLISECONDS"
echo "semaphore" + id + " body"
}
})
}
parallel s
this seems to run only 3 processes concurrently not matter what the value of permit is. Is the number of concurrent steps limited by the cpu count or something else irrespective of the permit parameter ?
Hi, I am using the plugin in the following way
this seems to run only 3 processes concurrently not matter what the value of
permit
is. Is the number of concurrent steps limited by the cpu count or something else irrespective of thepermit
parameter ?Thanks.