Yes, exactly this assumption comes in play. DF is build around assumption that layout of map can and will change constantly. Tiles are dug out, fluids flow, there was some cave-in...
Pretty sure I covered that aspect. Any changes to pathable squares would be updated by the path threads in a separate and discreet set of path data via a queue updated from the main thread. There are of course a lot of other ways to do that, possible some that are much better, but blocking is about the stupidest way imaginable to do this. So long as the data the pathing threads are working off of is not volatile then they're fine.
Cannot be done. As I said above, map layout could change between frames. So main loop must wait for finishing all pathfinding threads.
Again why? There is no difference between a synchronous pathing call returning results that are invalidated by changes in the next frame and an asynchronous one whose results are invalidated by that same frame. Either way the paths must be recalculated and the main thread must be the absolute authority on actually moving things.
Which is what I have been saying, heh. Processors literately do billions of instructions per second, but only thousands of asynchronous work units per second(unless you're using an advanced operating system/arch like solaris). To understand why, you have to know how processors and operating systems work. On a desktop pc with windows each thread is an actual program, with all of the overhead of being started, scheduled, put into different run states, and the system calls(interrupts yay) to communicate with.
I think you seriously over estimate the overhead for a work thread. If pathfinding is taking up 5% or more of resources (and if it's not then why are we talking about it as a significant performance improvement?) then sorry but there is no way that kicking off threads is going to come anywhere near that kind of burden, especially not when as you suggest you can batch tasks to limit threads. You've also got some serious misconceptions about how threads in Windows work (1st hint, all that crap you mention is done by whatever thread and core the op system is running on not by the DF thread or core).
Also why does there need to be any kickoff? One assumes there would either be a thread pool or a single dedicated pathfinding thread that on event or via polling consumes requests and returns results. You overhead (for the main thread) is negligible.
Java has nice concurrent libraries, and lately I have been having fun with Qt's concurrent library (QT is so java like.)
Excuse me while I chuckle quietly at the thought of actually programming real commercial software in Java...
And let me openly laugh out loud at the thought that you can ever by any means imaginable, technological or otherwise, account for the fickle and ever changing requirements of a client.
You can't see the contradiction there? You don't know how DF works, so you make your decision to thread based off your theory of how it might work. Then you ignore the people who write advanced utilities for DF and know a lot about how it works...
Not really no. I'm speaking in generalities using pathfinding as an example. I've repeatedly asked for a reason why specifically DF pathfinding is a poor candidate for threading. So far all I've gotten back is a lot of hot air and the excuse that pathfinding is cheap and threading is expensive. Neither of which I believe. Threading (if done right) is not all all that expensive and if pathfinding is so cheap then why are we even discussing it as a point for improvement?
There are very few programmers who have written something as complex and massive as Dwarf Fortress.
Disagree completely. DF is quite the accomplishment, especially for a one man team. It is very detailed especially in specific areas, and I'll buy the argument that it's one of if not the most complex and massive game in terms of scope. But to think that it is more complex in terms of programming than a whole lot of other games or commercial software is simply naive.
Look at major games that come out these days, they may have millions of dollars of art assets but the internal game engine typically has nothing on DF.
I've got news for you. Their render alone is more complex than DF in terms of lines of code, operations performed, difficulty, virtually any metric you want to come up with. So yeah if you want to compare gameplay complexity DF is going to be own most anything. But if you're talking overall programming complexity then sorry but it's not much of a competition.
Considering that we are on version .31, I would like to know specifically what was done wrong. The game is in the "we can we do" cycle, so the fact it works as well as it does and doesn't crash is an achievement.
What does the version have anything to do with things? If you're looking at it as an excuse then no need. DF is a one man project with an incredibly ambitious scope and it's free. There is absolutely no need for excuses. There is also no reason not to suggest and reasonably discuss possible improvements.
As for what's wrong it's a big list. UI, flat config files, lack of encapsulation, UI, and lots more. Plus that's only the fraction that we can see indirectly, the code itself is likely a horror show of objectively bad programming brought on by expediency and the organic way in which DF was written. It's not wrong that things are wrong, rather it's an expected part of software development. But glossing over them and attempting to elevate the author to the level of infallible programming messiah is wrong.
There is nothing done wrong, there is just stuff that hasn't been done yet.
Hardly, there's lots of stuff that been done but been done in the wrong way. It might have been wrong when it was written and only revealed by hindsight or it may have become wrong over time. I guarantee you that if that question was put to Toady he'd say the same thing. But I think I will use that line at work sometime
Every single piece of code I've ever written has been relative crap the minute I finished it because having written it I could now do a comparatively better job. If that's not true then you're not learning. Trust me, there's a very long list of things that are wrong in DF if for no other reason than that.