Hi,
I am doing .Net profiler for web applications where i register the environment variable in w3svc and WAS processes.. so only w3wp.exe loads my dll.
I have two functions in my native profiler dll for entry and exit call backs. In the Entry native call function i store the log in a map.
That map will be used by all the threads ( if the application that is being profiled has more than one thread). So in this case , there is a possibility for 2 threads coming into the entry function and they simultaneously access the map.
To avoid this scenario i opted for mutex locks.. but it ll make the calls to wait..!! ( performance issue). Is there any possibility that for each thread of web application can i create TLS ???
i guess allocating the TLS will allocate with the calling thread (i.e) the thread of the profiler attached process. Is there any other possible way to opt here ?
Thanks
./Selva