I have some question about boost::promise
After studying the website of boost and "C++ concurrency in action"
I still can't get the idea of boost::promise
According to the book(if I have no make any mistake)
boost::future is designed for one off event
you could wrap the task by packaged_task and let boost::unique_future
to gain the result of the task. When you launch the thread, you could
just return the boost::unique_future and wait for the result of the task.
After the task is finish, you could continue your job.
It is very like boost::condition_variable but design for one off event.
Do I make any mistake about it?
Assume that I didn't make any mistake about the idea of future, I still can't
get the idea of boost::promise, could you show me an easier example of it?
Thanks a lot