mirror of
https://github.com/github/codeql.git
synced 2026-04-25 00:35:20 +02:00
18 lines
289 B
C#
18 lines
289 B
C#
string name; // BAD: Not thread-safe
|
|
|
|
public string Name
|
|
{
|
|
get
|
|
{
|
|
if (name == null)
|
|
{
|
|
lock (mutex)
|
|
{
|
|
if (name == null)
|
|
name = LoadNameFromDatabase();
|
|
}
|
|
}
|
|
return name;
|
|
}
|
|
}
|