make pending packets thread safe