You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Request URL changes if I execute it in different thread #177
In my program I need to do periodical get and post requests on different threads. At the beginning of my main I call RestClient::init(), then when I need to send a request I create it, I print it as:
std::cout << "Request url:\n" << request.url << "\n";
and then I assign it to my thread_pool to execute in another thread. The other thread calls execute() method in my Request struct:
Of course, the request fails because of unkown url. I don't understand how is it possible that the assignment of the Request object to another thread could modify just the beginning of my url string. If I execute the same request in the main thread it works just fine, but I can't work with that in my program.
Activity