Thread handling (20/29)

Thread handling