Well anyone can modify static field and they will see the latest value set depending upon thread and processor scheduling. However for safe implementation you should define one more static object and use it for lock and provide your access to variable through static property.
private static object lockObject = new object();
private static int _MyValue = 0;
public static int MyStaticValue{
get{
int v = 0;
lock(lockObject){
v = _MyValue;
}
return v;
}
set{
lock(lockObject){
_MyValue = value;
}
}
}
This is thread safe as well as is shared for every threads and every instance as long as Service Host of WCF keeps process alive.
In IIS or any such process model, if process is recycled, you will loose the last static value.
You should use some sort of server/application level store. e.g. HttpContext.Current.Server (in case of ASP.NET).