pdo threads before and after