Quantcast
Channel: c++ Multi-threading Argument Issues - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by Miles Budnek for c++ Multi-threading Argument Issues

You are invoking undefined behavior by passing a pointer to a local variable to your threads and allowing the variable to go out of scope before it's used.C-style arrays are never passed by value. A...

View Article



c++ Multi-threading Argument Issues

I'm trying to pass a series of parameters into different c++ threads. The program runs fine when NumThreads == 1, however when NumThreads > 1, the p parameter I pass to the function is incorrect...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images