Currently openttd has a monolithic design. The monolithic design has the advantage of allowing the program to work faster (or so it seems) and seems more easy to code.
However, it has the following disadvantages:
- Encourages spaghetti code.
- Threading is extremely difficult to implement.
- Things are difficult to modify; and if you do, you might cause bugs in unexpected places.
- Clearer code (no vehicle related code in user interface code, etc.)
- Much better ability to provide threading (because everything works seperate from other parts).
- It'll become easier to produce working code.
- It is a lot of work to implement something like this.
- This will result in a total reorganisation of the code, as this touches nearly everything.
- Might become a (slight?) performance bottleneck if implemented incorrectly.
- Make a message system, which has the ability to queue messages. Move code to its appropriate location (no map code in vehicle code, no vehicle code in ui code, no ui code in sound code, etc.)
The message queue should be simple enough to make, but there might be a need to skip some messages temporarily until they can be processed. The messages should contain as little information as possible and only contain relevant information. This to ensure both performance and simplicity. Some strange modifications might become needed for this. - Build wrappers, to allow for a painless transition.
- Build message handlers in the appropriate places.
- convert wrappers to message system.
- Now start puting things in threads... I suggest the following
- User Interface (includes console) + viewport + OS interface (just needs to keep going with as little lag as possible).
- Network Interface + game ticks: would this help fight desyncs?
- Sound engine / mixer (just to be sure sound works, no matter what happens to the other parts of the game).
- AI players: unknown how much time a given AI player consumes.
- Pathfinder: keep game lag to a minimum.
- Vehicle database.
- Map engine.
- Message system
Why?
This would change the code for the better, parts of it might become slower, parts of it might become faster. But the code will become cleaner and in the end the entire code base will consist of modules.
The end result might be that the code is more accessible for patchers and new devs. The current spaghetti might even become readable!

The multithreading will serve to keep the program running smoothly, even with lots of vehicles wandering around the map.
When?
The sooner the better, but not before 0.4.5.
Please, keep in mind that I'm only suggesting this. It's highly probable this text is filled with mistakes and I made erronous assumptions. That does not mean, however, that the core ideas (modular design + threading aided by messages) won't work.
Please forgive my bad English and perhaps a bad choice of words or phrasing of sentences.