Created initially as a demonstration of a multi-threaded program for my second year Architectures and Performance module I have continued to develop this program to fix some of the problems that were present in the original version.
Thankfully I was able to fix the main issue with the original program where the program would hang indefinitely if any of the threads did not join properly at the end of a frame due to being stuck waiting to be released by the data channel. This problem was largely caused by what seems like rather poor design in hindsight where the program would open and close the required threads for dealing with the terrain data every frame, which caused the aforementioned problem and also made the program considerably more inefficient, counteracting a lot of the speed gains that could have been gained through the use of multi-threading.
More recently I have updated the program to do all the terrain manipulation asynchronously to the rendering stage of the program, allowing it to spread work across multiple frames, avoiding large drops in the frame rate. On top of this running the calculations asynchronously also fixes the indefinite hang that was occurring in previous versions of the program.