jenkinsci / jenkinsci/concurrent-step-plugin

acquireSemaphore permit seems to be limited

Open
#15 2 comments 4 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
21
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Hi,
I am using the plugin in the following way
```groovy
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 ?

Thanks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.