Define "How" it should be threaded, What exactly are you asking?
|
I'd like to get a good discussion going with some of the educated members here about how a server should be threaded.
I personally am still brainstorming and trying to come up with a good design but I'd like to see what others think so discuss.
Define "How" it should be threaded, What exactly are you asking?
Its better to have a fixed pool for something like player updating as too many threads will cause more damage to the server then good as player update would create a new thread for every update... I know it might seem good using multiple threads but there is allot of work behind the scenes you would need to create a new runnable event for each player the thread pool then has to put that into account and run it when a thread is free to do so.
Im not sure about the order of completion in regards to the player updating but if lets say the players appearance did change during the player update procedure im pretty sure what ever collection is holding your player object would also need to be thread safe which would kill any performance gain you got from using a thread pool. Maybe a worker thread would be more practical for that sort of thing...
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |