HttpWebRequest and I/O completion ports

前端 未结 3 430
遥遥无期
遥遥无期 2021-01-02 23:27

I\'m working on an application that requires for one type of message to go hit a database, and the other type of message to go and hit some external xml api.

I have

3条回答
  •  一个人的身影
    2021-01-03 00:21

    Maybe your EndRead methods should only write the result to a thread safe queue that you then read from a small number of worker threads that are under your control. And/Or use the fact that HttpWebRequest will signal a waitable object when it is done and write your own logic to wait on all the outstanding requests from a single (or small number of) threads.

提交回复
热议问题