Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Activity for hamsasimonâ€
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Edit | Post #280128 |
Post edited: Typo in title. |
— | almost 4 years ago |
Edit | Post #280128 | Initial revision | — | almost 4 years ago |
Question | — |
Confusion about using std::async with class member function So,I'm having a doubt when I call `std:async()` on a member function of a class. The book I'm reading says (emphasis mine) > You can also pass a pointer to a member function to async(). In that case, the first argument after the member function has to be a reference or a pointer to the object for w... (more) |
— | almost 4 years ago |
Edit | Post #280048 |
Post edited: Clearer wording |
— | about 4 years ago |
Edit | Post #280048 |
Post edited: Added more code for context. |
— | about 4 years ago |
Edit | Post #280048 |
Post edited: |
— | about 4 years ago |
Edit | Post #280048 | Initial revision | — | about 4 years ago |
Question | — |
When should I use wait() instead of get() when using C++ threads I'm trying to understand the purpose of the `wait()` function in Class future<> for C++. At the moment I don't see any purpose for calling `wait()` instead of `get()`. What I have tried in code: int main() { std::futureresult1(std::async(std::launch::deferred,func1)); ... (more) |
— | about 4 years ago |