Job system module primal.jobs #16
No assignees
Labels
No labels
area/build
area/content
area/editor
area/engine
area/graphics
area/platform
area/repo-wide
area/tests
area/tools
bug
optional
roadmap
size/L
size/M
size/S
No project
No milestone
Blocks
Depends on
#17 Frame phases primal.frame and queued entity changes
UnflavoredMeson/Primal_Plus_Plus
#18 Job system: spin before sleeping (measured)
UnflavoredMeson/Primal_Plus_Plus
#27 Shader hot reload
UnflavoredMeson/Primal_Plus_Plus
#28 ContentTools on both OSes
UnflavoredMeson/Primal_Plus_Plus
#6 Logging through primal::log
UnflavoredMeson/Primal_Plus_Plus
#11 The engine as one shared library
UnflavoredMeson/Primal_Plus_Plus
Reference
No Branch/Tag specified
Notifications
1 participant
Due date
No due date set.
Reference
UnflavoredMeson/Primal_Plus_Plus#16
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Transforms, render preparation, command recording and content loading all need to run on more than one core. A job system is the one place threads are made; everything else submits work.
Decided
primal.jobs(Engine/Core/Jobs.ixx+Jobs.cpp): the first module.importcomes after every#include, and only in.cppfiles (GCC 16 fails otherwise).jobs::submit, counters andwait()(a waiting thread runs jobs),parallel_for;PRIMAL_JOBS=<n>sets the worker count,0runs every job on its caller.linux-tsan,ci.sh tsan, a CI job.attach_thread()for a foreign thread only if the editor needs one (it likely doesn't: the C++ editor renders on the frame thread).UnflavoredMeson/Primal#72.Read first
Engine/Utilities/Threading.honmaster(what it replaces).Steps
UnitTests/JobTests.cppfirst: submit and wait, nested jobs,parallel_forover 0, 1 and 100,000 items,PRIMAL_JOBS=0.Engine/Modules.propsfor the other Windows projects).Done when
Claude can help with
Learn