I need a boost thread to report back success or failure. I am currently doing it by passing a pointer to a bool in. It works most of the time but throws a access violation error once in a while.
Is there any thing wrong in passing in pointers for returning success or failure of the thread function ? is there any other way to do this?
BR
Niladri
You may be able to use a future. You can think of a future as a shared value between threads. One thread will write the value of the future and another thread will read it. If the future has not yet been written, the reading thread will block until it has. Futures are already a part of boost.threads.