This program calculate Pi using threads