The next C++ standard is supposed to include futures in the libraries. Futures allow assignment to a value that is to be calculated at a later time - assigning a promise in lieu of the final value until such time as it becomes available.
The current thread carries on until the value is actually needed, at which time the value is made available or a the thread goes into a wait state.
Being a library facility, instead of a built-in...
Post new comment