The protection of wild animals is protection of earth.
esv::deferred is used to create deferred std::future thread. Unlike std::async which takes a parameter to indicate async or deferred, esv::deferred is always in deferred mode.
esv::deferred is based on std::async, that esv::deferred will call std::async.
#include <esvcpp/core.hpp> #include <esvcpp/thread.hpp> int main() { std::future<void()> f1 = esv::deferred([] {esv::print("Hello!");}); auto f2 = esv::deferred([] {esv::print("c++!");}); f1.wait(); f2.wait(); }