#include <future>#include <iostream>int calculate_the_answer_to_LtUaE();void do_stuff();int main(){ std::future<int> the_answer=std::async(calculate_the_answer_to_LtUaE); do_stuff(); std::cout<<"The answer to life, the universe and everything is " <<the_answer.get()<<std::endl;}
무슨언어에서 작업중임?
자바스크립트
http://m.dcinside.com/view.php?id=programming&no=648500
eagle이 도움이 될지도 모름
아 ㅅ발 프라미스를써야지 왜프라미스를생각못햇지;
#include <future>#include <iostream>int calculate_the_answer_to_LtUaE();void do_stuff();int main(){ std::future<int> the_answer=std::async(calculate_the_answer_to_LtUaE); do_stuff(); std::cout<<"The answer to life, the universe and everything is " <<the_answer.get()<<std::endl;}
아 프라미스도아니야; 그니까 비동기함수호출후에 바로다음문장이 비동기함수가 완전히끝나고실행대야되는건데 이거 방법없을라나?
문맥을 완전히 정지시키고 싶은거임?
플래그 참값 하나두고 그걸로 while돌리고 콜백으로 false로 바꾸고 이런식으로 편법가능한데
되야->돼야 (되어 = 돼임) [리듬 맞춤법 봇♬]