What's the best way to make an assoc array fit for multi-threading? If this is not possible what would be the best alternative?

Say, for example, `data` is used by a class that is globally accessible to all threads. E.g. like this:

string[string] data;  // defined somewhere

public string getData(string key)
{
  if (key in data)
    return data[key];
  else
    return "";
}

Reply via email to