PrevUpHomeNext

utx::ydzs


utx::ydzs

utx::ydzs, aka yield-this-thread, is used to yield this thread, which will call std::this_thread::yield. utx::ydzs() is a shorthand of std::this_thread::yield().

c++ example

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

int main()
{
	auto f1 = utx::async(
		[]
		{
			for (utx::ix32 i=0; i<10; ++i)
			{
				utx::print(i);
				utx::ydzs();
			}
		}
	);
}

See Also

utx::async

utx::deferred

utx::mutex0~9

utx::print


PrevUpHomeNext

utx::print

esv::print