more double checked locking
This commit is contained in:
parent
fe1f40f927
commit
3655814e4a
1 changed files with 4 additions and 3 deletions
|
|
@ -939,9 +939,10 @@ namespace Server
|
|||
{
|
||||
get
|
||||
{
|
||||
lock (tileLock)
|
||||
if ( m_Tiles == null )
|
||||
m_Tiles = new TileMatrix( this, m_FileIndex, m_MapID, m_Width, m_Height );
|
||||
if (m_Tiles == null)
|
||||
lock (tileLock)
|
||||
if (m_Tiles == null)
|
||||
m_Tiles = new TileMatrix(this, m_FileIndex, m_MapID, m_Width, m_Height);
|
||||
|
||||
return m_Tiles;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue