mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-09-10 04:41:32 -04:00
Fix crash on close.
This commit is contained in:
parent
28cb01353a
commit
cbf784d1e9
@ -838,6 +838,7 @@ pub const RenderStructure = struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn deinit() void {
|
pub fn deinit() void {
|
||||||
|
main.threadPool.clear();
|
||||||
for(storageLists) |storageList| {
|
for(storageLists) |storageList| {
|
||||||
for(storageList) |nullChunkMesh| {
|
for(storageList) |nullChunkMesh| {
|
||||||
if(nullChunkMesh) |chunkMesh| {
|
if(nullChunkMesh) |chunkMesh| {
|
||||||
|
@ -316,6 +316,7 @@ pub const ThreadPool = struct {
|
|||||||
for(self.loadList.array[0..self.loadList.size]) |task| {
|
for(self.loadList.array[0..self.loadList.size]) |task| {
|
||||||
task.vtable.clean(task.self);
|
task.vtable.clean(task.self);
|
||||||
}
|
}
|
||||||
|
self.loadList.size = 0;
|
||||||
self.loadList.mutex.unlock();
|
self.loadList.mutex.unlock();
|
||||||
// Wait for the in-progress tasks to finish:
|
// Wait for the in-progress tasks to finish:
|
||||||
while(true) {
|
while(true) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user