Alright i have an application which starts hundreds of crawling tasks at the same time and those tasks adds hundreds of found urls into a dictionary
I am using lock to add each found url however i see that all threads are waiting at lock (it works but i am looking for faster working way if there is any)
I wonder are there any better way for me to improve performance
The application is .net 4.5.1 c#-5 WPF application
This is my dictionary definition
private static Dictionary<string, UrlHolder> dicUrlHolder = new Dictionary<string, UrlHolder>();
This is how i use
lock (dicUrlHolder)
{
//do stuff here each time gets a lock
}
So i wonder any other better way to use it between hundreds of threads locking concurrently hundreds of times to add / update