Closed MamiyaOtaru closed 10 years ago
though I will say the odds of the map calculation thread checking a chunk and setting isModified to false between downloading = false and saving = true is really really tiny. I haven't had it happen yet, but it could
anyway, next VoxelMap should get rid of a bunch of your bug reports
Closing this since you have also created pull request #47 regarding this problem.
So I write Voxelmap. You've quoted me in your thread with my workaround for having the map and world downloader work together (a variable in the map's config file that turns off the map's chunk updating for the duration of the session). I figured it was about time I did it automatically, whenever WDL starts downloading.
So, if (WDL.downloading), I can tell the map not to check for chunk updates (and thereby not set chunk.isModified to false). The problem is when the download ends. WDL.stop() sets downloading to false, and then starts the save thread. Problem being as soon as downloading is false, the map then starts up chunk updating, and nearby chunks can have isModified == false when WDL.saveChunks() gets to them (so they aren't saved)
I could poll for (!WDL.downloading && !WDL.saving), but there's still a (very brief) moment after downloading is set false before saving is set true. If you could either delay downloading = false until after saving = true, or move saving = true before downloading = false or something, I would know when it was safe to start the map's chunk checking again.