codewarrior0/pymclevel — Issue #70: InfdevChunk shouldn't compress and decompress itself.
Author: codewarrior0
Created: 2012-02-11 10:09:10+00:00
State: open

This was a stupid way of saving some memory, and causes a crash when chunkDidDecompress decides to recompress another chunk that's already in use by another thread. Use a different object type for compressed, unsaved chunks and keep them in a separate list. Only use InfdevChunk for fully loaded editable chunks. Remove all of the chunkDidDecompress and compressedChunkQueue nonsense. Maybe try to pass memory responsibility onto the client, but be sure to provide functions for getting the level's current memory use and unloading/compressing every chunk.