Will ManualResetEvent / AutoResetEvent use workthread or IO-thread in asp.net

the web layer is coded in asp.net with pages marked as async. Yes, the recommended coding way for aync is to use RegisterAsyncTask

I have a problem now: there are several pages that used AutoResetEvent and ManualResetEvent for aync, not the standard RegisterAsyncTask.

Will these objects serve asynchronous calls, use worker threads from the threadpool? (not recommended as this will exhaust worker threads and the server will not be able to serve other client requests

OR

will they use I / O streams? (usually IO threads are used for asynchronous calls using RegsterAsyncTask, this is desirable)

I will need to suggest changing these pages based on your ideas. Any opinions please?

0


source to share


1 answer


Reset event objects do not use different threads - they just block / release the current thread based on the current state and actions of other threads.



When you say there are other pages that have used AutoResetEvent and ManualResetEvent for [s] ync "what exactly do you mean? These are synchronization objects and do not provide a way (by themselves) to make operations asynchronous. Something else has to start the thread or use a thread pool.

+1


source







All Articles