getting a return value from a bind?
hi , i have on my code something like boost::thread thrd(boost::bind(&myioTCPLTE,TCPmsg)) function myioTCPLTE return a string value, bu i dont now how to get it to store in a different variable from the main code!! Could anyone help me? thanks -- Pedro Alonso Chaparro Valero R&D Engineer Ciudad Politecnica de la Innovación iTEAM - Mobile Communications Group Polytechnic University of Valencia C\ Camino de Vera S/N, Edificio 8G 46022 Valencia, Spain
boost::thread thrd(boost::bind(&myioTCPLTE,TCPmsg))
function myioTCPLTE return a string value, bu i dont now how to get it to store in a different variable from the main code!! Could anyone help me? thanks
Thread function runs in different thread, asynchronously, so where and
when do you mean to get its return value?
You can take a look at the "future" concept:
http://www.boost.org/doc/libs/1_45_0/doc/html/thread/synchronization.html#th...
Quoting from there:
<
participants (2)
-
Igor R
-
pedro chaparro