PrevUpHomeNext

esv::async


Achieve harmony between man and nature.

esv::async

esv::async is used to create asynchronous std::future thread. Unlike std::async, esv::async is always in async mode: std::launch::async. If the operating system or runtime environment does not support asynchronous thread model, esv::async prefers crash, not continue creating a non-asynchronous thread.

esv::async is based on std::async, that esv::async will call std::async.

c++ example

#include <esvcpp/thread.hpp>
#include <esvcpp/core.hpp>

int main()
{
	std::future<void()> f1 = esv::async([] {esv::print("Hello c++!");});
	auto f2 = esv::async([] {esv::print("c++ Hello!");});
}

See Also

esv::deferred

esv::ydzs

esv::mutex0~9

esv::print


PrevUpHomeNext

esv::print