Parallelism returns the current parallelism. This defaults to the number of CPUs.
()
| 30 | // |
| 31 | // This defaults to the number of CPUs. |
| 32 | func Parallelism() int { |
| 33 | globalLock.RLock() |
| 34 | parallelism := globalParallelism |
| 35 | globalLock.RUnlock() |
| 36 | return parallelism |
| 37 | } |
| 38 | |
| 39 | // SetParallelism sets the parallelism. |
| 40 | // |
no test coverage detected
searching dependent graphs…