Create PGThread.cpp

Implementation of the PGThread lib.