How to retrieve a value from a thread
All, I would like to know if it is possible to retrieve a value returned from a function which is called by a thread. Using boost::bind one can pass a list of arguments to a function which is called when the boost::thread starts. But I would like to know what will happen if the function returns a certain value, e.g. failure flag. Is there a way to retrieve it? The usual way would be to pass a reference to the function and then wait for the thread to join. Is there another way? Thanks a lot for help, Pshemek Przemyslaw Sliwa Global Foreign Exchange FX Risk Engine Development Merrill Lynch ( +44 (0)20 7995 4182 ) +44 (0)79 6325 2319 * Email: przemyslaw_sliwa@ml.com -------------------------------------------------------- If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for important additional terms relating to this e-mail. http://www.ml.com/email_terms/ --------------------------------------------------------
participants (1)
-
Sliwa, Przemyslaw (London)