For lucky #13, I want to know what can go terribly wrong with the following code, and why.
class
HardWorker
{
public
void DoMultiThreadedWork(object someParameter)
{
lock (lockObject)
{
// ...
lots of work ...
}
}
private
string lockObject = "lockit";
}
Hint: Think about memory optimizations in the CLR.