2011年6月10日星期五

one queue

Here is what i learn from the project.

I used to maintain multiple queues for my project. Now I find out that I should not do that. do one for every screen is reasonable, because one will not interfere with another. But if I have two queues for one screen. one queue might grab the packet from the net that other queue need. and the game just lose a packet.

Now I just put one queue for the whole project, and put all packet that comes from the net to the queue. if the packet does not match the need. Just put the packet back. other part of the program might need it.

没有评论:

发表评论