Skip to content

Use spin mutex for goods and countries#749

Merged
wvpm merged 1 commit into
masterfrom
use_spin_mutex
May 20, 2026
Merged

Use spin mutex for goods and countries#749
wvpm merged 1 commit into
masterfrom
use_spin_mutex

Conversation

@wvpm
Copy link
Copy Markdown
Contributor

@wvpm wvpm commented May 20, 2026

Due to parallel processing all sorts of actors (RGOs, artisans, pops, countries, etc) place their orders on the market concurrently.
This requires a mutex to coordinate. As the action inside the lock is minor, the lock is quickly released. Spin waiting seems to be faster in this case.

[2026-05-20 22:53:21.616] [info] Ran 1000 / 1000 ticks, total time 55887416600ns at 55887416ns per tick, tick time only 55885235600ns at 55885235ns per tick. Tick lengths ranged from 44021500ns to 516810600ns.

@wvpm wvpm requested a review from a team as a code owner May 20, 2026 20:58
@wvpm wvpm enabled auto-merge May 20, 2026 21:03
@wvpm wvpm force-pushed the use_spin_mutex branch from 1b46632 to 1a4f104 Compare May 20, 2026 21:04
@Spartan322 Spartan322 added the enhancement New feature or request label May 20, 2026
@wvpm wvpm merged commit 479e29b into master May 20, 2026
16 checks passed
@Spartan322 Spartan322 deleted the use_spin_mutex branch May 20, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants