Hi all,
I have one confusion regarding threading in windows service which is
developed in c#.
What i am doing is on 'onstart' event i am starting one thread.
In thread procedure i am processing some URL's asynchronously.
Say in thread procedure for validating url through webrequest i am
calling beginwebrequest for procesing 5 urls at a time.
Does it means my thread is spawn into 5 threads. Means invoking
webrquest asynchronouly create new thread? And if yes does it create
thread in threadpool.
Secondly in beginwebrequest i am passing one callback fuction whcih
needs to get invoke after processing completed. This callback i am
handling in outer thread.
After after this process is over i am enabling one timer which is again
doing same things on its elapsed event. Means start processing of 5
webrequest asynchronously.
Can some one tell me is anything wrong in this code.
Becuase this code is hanging suddenly after working properly for say
3-4 times.
Please correct me if i am wrong.
thanks in advance.