kjn / lbzip2

Parallel bzip2 utility
GNU General Public License v3.0
132 stars 17 forks source link

Limit thread upper bound #24

Open hongxuchen opened 5 years ago

hongxuchen commented 5 years ago

We can specify the thread number to be applied with -n. However there is no upper bound limit for it. If the value is huge, lbzip2 will report unable to create a POSIX thread: Resource temporarily unavailable and hang there.

We think it's reasonable to have some upper bound check for the thread number.