Create thread flow