Elegant R Runtime Solution for Multithreading