vigna / fastutil

fastutil extends the Java™ Collections Framework by providing type-specific maps, sets, lists and queues.
Apache License 2.0
1.78k stars 196 forks source link

Make fastutil use the current ForkJoinPool if already in one #194

Closed techsy730 closed 3 years ago

techsy730 commented 3 years ago

Make fastutil use the current ForkJoinPool if already in one

Removes the shutdown() calls as we don't want to be shutting down users' Executors (we were getting away with it earlier because the common pool swallows shutdown requests).

Fixes https://github.com/vigna/fastutil/issues/193

techsy730 commented 3 years ago

Ok, got rid of Threading and just put the static utility method in each class. A bit unfortunate, but any optimizer worth anything should be able to see these methods are tiny and inline them in short order.

vigna commented 3 years ago

Can I merge this PR?

vigna commented 3 years ago

OK, I'll wait tomorrow ;).

techsy730 commented 3 years ago

I think I am good now, but running unit tests just to be sure.

techsy730 commented 3 years ago

Looks like we are good. Tests passed and the coverage numbers said the parallel operations were still parallel. That last force-push was just to remove my local .gitignore that wasn't supposed to be committed.