Change (10.6.6.0)

Change (10.6.6.0)

Postby Breakdown901 » 23 Jun 2013, 11:22

- change: optimized synchronization.


What does this actually mean?
Owner of:
Breakdown901 Lava Survival/Zombie Survival/Freebuild
Host of NeonGaming Lava Survival.
Breakdown901
 
Posts: 320
Joined: 24 May 2013, 12:54

Re: Change (10.6.6.0)

Postby dzienny » 23 Jun 2013, 23:34

I've recently introduced a method PlayerCollection.ForEachSync(Action) that used locking to assure that all elements of the Player.players collection are iterated. The simple lock was used. It's however not the optimal solution for multiple concurrent reads and relatively rare write operations. Fortunately there's another way to do it. I changed the simple lock to ReadWriteLockSlim type. It allows multiple simultanous reads thus reducing the waiting time.

The above explanation to understand requires a basic knowledge of threading and thread synchronization.

In short, the server should work slightly faster.
User avatar
dzienny
Administrator
 
Posts: 1181
Joined: 23 Jan 2011, 14:27

Re: Change (10.6.6.0)

Postby Breakdown901 » 24 Jun 2013, 19:28

I understood the last line :P
Owner of:
Breakdown901 Lava Survival/Zombie Survival/Freebuild
Host of NeonGaming Lava Survival.
Breakdown901
 
Posts: 320
Joined: 24 May 2013, 12:54


Return to Help

Who is online

Users browsing this forum: No registered users and 6 guests

cron