Add copmilation in different thread.