title: How to get the current max-workers value?
body: <p>In my <code>build.gradle</code> script, I have an <code>Exec</code> task to start a multithreaded process, and I would like to limit the number of threads in the process to the value of max-workers, which can be specified on the command line with <code>--max-workers</code>, or in gradle.properties with <code>org.gradle.workers.max</code>, and possibly other ways. How should I get this value to then pass on to my process?</p>
  <p>I have already tried reading the org.gradle.workers.max property, but that property doesn't exist if it is not set by the user and instead max-workers is defined by some other means.</p>