1.

How Can You Retrieve Results From A Thread?

Answer»

As we'll SEE in a SUBSEQUENT tutorial, the easiest and recommended way is to use "futures". However, you can still get the result of some calculation from a thread by either:

Passing reference to a result variable to the thread in which the thread stores the results

Store the result inside a CLASS memeber variable of a function OBJECT which can be RETRIEVED once the thread has finished executing.

As we'll see in a subsequent tutorial, the easiest and recommended way is to use "futures". However, you can still get the result of some calculation from a thread by either:

Passing reference to a result variable to the thread in which the thread stores the results

Store the result inside a class memeber variable of a function object which can be retrieved once the thread has finished executing.



Discussion

No Comment Found