title: Java best way to multihread save/load large amounts of data
body: <p>For a game I am writing, the world is saved as chunks. Each chunk (when saved) is just under 200kb (they are very large chunks). Whenever a world is loaded 121 chunks need to be loaded. Each one only takes a fraction of a second, but all those fractions add up and lead to taking several seconds.</p>
  
  <p>This would be ok, but saving is even more important. When a player walks into new chunks, all the chunks out of range will be saved and unloaded. As each save takes a fraction of a second, I would get a lag spike of over a second every time the player moves chunks. For this reason, I hope to use Threads to save and load chunks so that a chunk can be saved/loaded while the game is still running.</p>
  
  <p>I have no idea how I would implement such a thing though. So, if anyone could share a link to a tutorial or give some source code I could play with, that would be great!</p>
  
  <p>Thanks!</p>