Restoring auto-detection of threads to likefunc.cpp