Added multithreading logic.

Added multithreading logic, but it does not seem to trigger multiple GPPublishing instances.