Are there any issues with my multithreaded HttpClient?

后端 未结 4 1877
走了就别回头了
走了就别回头了 2021-02-04 16:47

So after dabbling with Java and HttpClient, I\'ve decided to transition to C# to try and lower the memory usage while increasing speed. I\'ve been reading tons of articles provi

4条回答
  •  难免孤独
    2021-02-04 17:27

    Messing with the headers is not thread safe.

    For example, swapping out an OAuth access token with a new one is not thread safe. Facing this right now with a Xamarin mobile app. I have a crash report where one thread was modifying headers while another thread was attempting a request.

提交回复
热议问题