- Joined
- Jun 29, 2009
- Messages
- 139
- Reaction score
- 12
Has anyone considered handling the 'game' related packets on one thread?
Right now, all sources that I know of handle each packet on whichever thread it is currently running on. This also includes all the TimerManager threads. Because of all these threads accessing and writing to different variables, we are constantly dealing with multi-threading issues. While some things are being handled correctly, there are lots of locks and synchronize key words being used, and in many cases we have sources that only last about 24 hours before they run out of memory.
If we were to queue all these packets and onto a separate, single thread then wouldn't we be able to avoid many of these problems?
Right now, all sources that I know of handle each packet on whichever thread it is currently running on. This also includes all the TimerManager threads. Because of all these threads accessing and writing to different variables, we are constantly dealing with multi-threading issues. While some things are being handled correctly, there are lots of locks and synchronize key words being used, and in many cases we have sources that only last about 24 hours before they run out of memory.
If we were to queue all these packets and onto a separate, single thread then wouldn't we be able to avoid many of these problems?