Refactor Secondary Threads #12

Merged
EmaMaker merged 4 commits from multithread-refactor into main 2023-10-04 13:32:42 +02:00

4 Commits (main)

Author SHA1 Message Date
EmaMaker 88abf21502 multithread: refactor update thread, communication between mesh/gen/upd threads
- Use parallel_for to iterate over all the stored chunks
- Only push a chunk to a queue if it is not already present, using chunk state bitfield (solves
	memory leak, continously adding new elements to a queue)
- Properly delete an element from chunks concurrent_hash_map using accessor, then free the memory
(solves memory leak: not being able to delete old elements and always adding new ones)

Breaks:

- Rendering (will be properly refactored in a future commit)
- Block picking (will be refactored in a future commit)
2023-10-04 13:10:05 +02:00
EmaMaker f4947d5f70 debugwindow: catch exception to avoid crash when missing parameters 2023-10-04 12:58:00 +02:00
EmaMaker 4e7fadd2b9 chunk: use chunk state to mark presence of chunk in thread communication queues 2023-10-04 12:57:57 +02:00
EmaMaker d1b151f92f chunk: typedef for chunk state 2023-10-04 12:57:57 +02:00