A lambda expression is used instead of passing a reference to a member function as a thread callable.