Ensure that Wget2 does not spawn more threads than needed
I'm creating a pull request here since I'd like to ask for a review before actually merging this code.
The patches are simple. They do three important things:
- Add a utils.[ch] file for defining commonly used functions.
- Rename the --num-threads option to --max-threads. Since, we're really defining the "max" value here.
- Use the config.num_threads variable to store the actual number of threads that the instance will use.
Here, I'm not sure if I've missed something that actually needs to use the config.max_threads option but isn't. @rockdaboot if I'm missing something, please point out.
Should fix #9 (closed)