CRM64Pro main-thread frame execution and background work
The main thread runs Main update, logic, particle update and rendering. Particle workers simulate frozen emitter jobs and join the main thread at a barrier. Audio and NetTCP run independently.
ONE FRAME ON THE MAIN THREAD
time
Main thread
public API, logic and GFX
Main::update()
input and housekeeping
game logic
application-owned order
particle update
standalone: ParticleMgr::update()
Scene-owned: Scene::update()
barrier
workers join
render
Scene, particles, GFX
synchronous fork and join
Particle jobs
optional persistent workers
idle until a particle batch is submitted
the main thread participates when workers are enabled
simulate frozen emitter-local jobs
no live Scene state or rendering access
idle
until the next batch
Audio mixer
persistent background work
SDL3_mixer mixes and outputs audio independently
no main-thread frame barrier
NetTCP I/O
persistent background work
socket I/O, connection work and message queues
applications use documented control and queue APIs
Audio and NetTCP are concurrent lifetime tracks. They are not created or joined by each frame.