Pass pid and tid explicitly

This way Transcations don't have to synchronize with each other, if each one has to do something unique.