Split out thread from lambda to member function