mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
18 lines
295 B
C#
18 lines
295 B
C#
volatile string name; // GOOD: Thread-safe
|
|
|
|
public string Name
|
|
{
|
|
get
|
|
{
|
|
if (name == null)
|
|
{
|
|
lock (mutex)
|
|
{
|
|
if (name == null)
|
|
name = LoadNameFromDatabase();
|
|
}
|
|
}
|
|
return name;
|
|
}
|
|
}
|