mutgos / mutgos_server

MUTGOS, a modern MUD MUCK MUSH MOO MU* text game engine
MIT License
4 stars 2 forks source link

Fix reference updating code to update references immediately rather than on separate thread #10

Closed zelerin closed 4 years ago

zelerin commented 5 years ago

Currently, when an Entity changes what room it is in, this updates the references attribute on the room it has left and entered. This is normal, however currently the updating is done on the DB update thread which only polls every 3 seconds. This can cause situations like entering a room but no one can look at you for several seconds, or dropping/getting something and not seeing it for a few seconds.

The solution should be as simple as refactoring the reference updating code to execute immediately, in the same thread of control as the Entity being updated, rather than pulling the request later off a queue.