Tomer Peled
Tomer Peled

Reputation: 3591

IHttpAsyncHandler flush - worker thread vs io thread

I'm using IHttpAsyncHandler with BeginProcessRequest and EndProcessRequest methods. Say I have the following code under EndProcessRequest method:

    public void EndProcessRequest(IAsyncResult result)
    {
         result.Context.Response.Write("Some message");
    }

The Write method itself only writes to an inner buffer, but when the EndProcessRequest is finished, the buffer is flushed to the stream and close the connection.

My question is which thread is doing the flush? the worker thread which ran the EndProcessRequest code or an IO thread?

Upvotes: 0

Views: 104

Answers (0)

Related Questions