GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||
GeezerVison is showing cpppatterns.com — Pass values between threads - C++ Patterns
← Patterns
Pass values between threads
This pattern is licensed under the CC0 Public Domain Dedication.
Requires
c++11
or newer.
IntentUse promises to communicate values between threads. DescriptionOn line 11 we create a On line 6, in the thread function, we set the value of the promise to
the value that we wish to asynchronously communicate back to
On line 16, we call the future’s Share | ||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |