Page 1 of 1

Change (10.6.6.0)

PostPosted: 23 Jun 2013, 11:22
by Breakdown901
- change: optimized synchronization.


What does this actually mean?

Re: Change (10.6.6.0)

PostPosted: 23 Jun 2013, 23:34
by dzienny
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.

Re: Change (10.6.6.0)

PostPosted: 24 Jun 2013, 19:28
by Breakdown901
I understood the last line :P