Commit Graph

6 Commits

Author SHA1 Message Date
Aryadev Chavali
a5666328b7 Fixed the heap-use-after-free issue.
Just standard multithreading stuff; access to the allocator while hot
threads are running means stuff can change underneath us even /during/
a read.  I've mutex locked state for stuff in the drawing domain which
stops this issue.
2025-12-12 04:29:32 +00:00
Aryadev Chavali
f70517cf41 Simplify mutex locking scheme (lock at start, unlock at end) 2025-12-12 03:08:56 +00:00
Aryadev Chavali
014821ceb5 Added booleans for thread workers to look at when running
pause_work temporarily stops work, but should keep the thread alive.

stop_work should kill the thread.
2025-11-28 17:22:39 +00:00
Aryadev Chavali
6f620644bf Define constructors for state.hpp explicitly 2025-11-27 01:57:10 +00:00
Aryadev Chavali
40e07e03f2 Add mutexes to state for the queue and the allocator
Our threads need to negotiate access and mutation to the two
resources - we don't want them treading on each others toes when
generating new child nodes /or/ when trying to remove/add work to the
queue.  The former situation is particularly worrisome due to how weak
the indexing system is with the allocator.
2025-11-27 01:42:24 +00:00
Aryadev Chavali
0ac316ada4 Define the general state of the sim (extract from main.cpp) 2025-11-27 01:30:21 +00:00