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
When the curl_global_init and curl_global_cleanup methods are called again on each HttpRequest object, if many HttpRequests are used in parallel in a multi-thread structure, it causes a race condition and causes one thread to cleanup before the other one finishes its work, resulting in undefined behavior. To prevent this, the curl_global_init method should be called once for the first HttpRequest and should not be called again. Similarly, the curl_global_cleanup method must be called once when exiting the application.
However, these calls should not be left to the user. It should be automated with static methods and mutex.
The text was updated successfully, but these errors were encountered:
When the curl_global_init and curl_global_cleanup methods are called again on each HttpRequest object, if many HttpRequests are used in parallel in a multi-thread structure, it causes a race condition and causes one thread to cleanup before the other one finishes its work, resulting in undefined behavior. To prevent this, the curl_global_init method should be called once for the first HttpRequest and should not be called again. Similarly, the curl_global_cleanup method must be called once when exiting the application.
However, these calls should not be left to the user. It should be automated with static methods and mutex.
The text was updated successfully, but these errors were encountered: