mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-21 20:25:51 +12:00
Add Thread-Safe Lists, and make all list access thread-safe
This commit is contained in:
parent
900fe0d48a
commit
40c34ac030
24 changed files with 111 additions and 44 deletions
|
@ -14,7 +14,7 @@ namespace HISP.Game
|
|||
{
|
||||
|
||||
private static List<Arena> arenas = new List<Arena>();
|
||||
private List<ArenaEntry> entries;
|
||||
private ThreadSafeList<ArenaEntry> entries;
|
||||
private Timer arenaTimeout;
|
||||
public static int[] ExpRewards;
|
||||
public int Id;
|
||||
|
@ -59,7 +59,7 @@ namespace HISP.Game
|
|||
Slots = slots;
|
||||
Timeout = timeOut;
|
||||
arenas.Add(this);
|
||||
entries = new List<ArenaEntry>();
|
||||
entries = new ThreadSafeList<ArenaEntry>();
|
||||
}
|
||||
|
||||
public bool HaveAllPlayersCompleted()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue