Skip to content

Add remote spawns#46

Merged
NthTensor merged 3 commits into
mainfrom
remote_spawns
Jul 6, 2026
Merged

Add remote spawns#46
NthTensor merged 3 commits into
mainfrom
remote_spawns

Conversation

@NthTensor

Copy link
Copy Markdown
Owner

This adds a new spawn_on operator, that sends work to a remote thread using the same underlying queue as broadcasts. This operator is needed for game-engine scheduling, where we want bias the normal amortization/stealing path to eagerly distribute a small number of long-running tasks.

I also changed the Spawn and SpawnScoped traits to decouple task-type (closure, or async function) from task-scheduling (shared, local, or remote).

Every time I do stuff like this, I have to run a full safety audit to ensure all the arguments still work. Usually I find a bunch of places where I can improve the existing safety proofs. This time was no different; I've made a lot of small improvements to safety arguments across the repo, and fixed a few minor things.

@NthTensor NthTensor enabled auto-merge (rebase) July 6, 2026 14:14
@NthTensor NthTensor disabled auto-merge July 6, 2026 14:14
@NthTensor NthTensor merged commit 8514a65 into main Jul 6, 2026
4 checks passed
@NthTensor NthTensor deleted the remote_spawns branch July 6, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant