Used go routine as semaphore to limit number of go routine.