lg$set_threshold(old_threshold) setDTthreads(old_dt_threads) Sys.setenv("OMP_THREAD_LIMIT" = old_omp_threads)