std::async won’t spawn a new thread when return value is not stored
From just::thread documentation: If policy is std::launch::async then runs INVOKE(fff,xyz…) on its own thread. The returned std::future will become ready when this thread is complete, and will hold either the return value or exception thrown by the function invocation. The destructor of the last future object associated with the asynchronous state of the returned std::future … Read more