klebgenomics / Kleborate

GNU General Public License v3.0
117 stars 49 forks source link

Request: Default to 1 CPU thread #70

Open schorlton opened 1 year ago

schorlton commented 1 year ago

Thanks for the great tool. I'm of the opinion that Kleborate should not use more than 1 thread unless allocated more via a command line arg as I suppose it would be possible for it to clobber hundreds of CPUs in a worst case scenario without the user being able to control it.

I see this in the code: https://github.com/klebgenomics/Kleborate/blob/f2c9c31d763c4c5df8848aa7a6ee65c919557ee6/kleborate/kaptive.py#L53-L68

Is it possible limit to 1 thread by default and add a flag when calling the tool if the user wants more? I don't expect that multithreading would provide significant speed advantage regardless?