InterviewSolution
Saved Bookmarks
| 1. |
Does A C++11 Thread Act On A Specific Instance Of A Function Object? |
|
Answer» No – function objects are copied to the internal storage for the thread. If you need to execute the operation on a specific INSTANCE of the function object, you should use STD::ref() from <functional> HEADER to pass your function object by REFERENCE. No – function objects are copied to the internal storage for the thread. If you need to execute the operation on a specific instance of the function object, you should use std::ref() from <functional> header to pass your function object by reference. |
|