Multi-Threaded application , using static dictionary . which will be used to process the request , each request will access only one record .
Processing the Request
- Read Record
- Algorithm to calculate the values
- Update the record.
During the process that particular record needs to blocked .
static Dictionary<string, InstacneLevel> objlevel; -- Static variable
lock (key)
{
// need to lock required key
// read , Calclulate and update the value for that key
}
I dont find any Clue , can anyone please help me out.
Can i go with ConcurrentDictionary??