v1.007
- Make
InitNetwork()
conditional. - Remove event thread, and move the logic into the main thread. There is no advantage in having two threads, because they both use the same mutex, and therefore can't work in parallel most of the time. This also prevents internal lock contention.
- Add delay of 0s to help with external lock contention, this is useful when a user calls server API while the server is busy with sending data.
- Remove use of
ClientQueueEnqueue(*Object, *Client)
outside of the server's mutex. This was only called in caseAllocateMemory
failed, so basically never.
The lock contention was mainly a problem on linux systems, as the mutexes seem to work a bit different than on windows. Due to the changes, the server should now have lower latency and increased throughput.