Pthread based class implemented