Paralellise update gamestate & modifiers#741
Draft
wvpm wants to merge 2 commits into
Draft
Conversation
05a9419 to
45a7c59
Compare
44c0e3b to
18d03f0
Compare
schombert
reviewed
May 19, 2026
| break; | ||
| case work_t::COUNTRY_TICK_BEFORE_MAP: | ||
| for (CountryInstance& country : work_bundle.countries_chunk) { | ||
| country.country_tick_before_map( |
There was a problem hiding this comment.
doesn't this call manage_national_stockpile which ultimately can call add_buy_up_to_order (for example), which is thread safe, but will make the order of the contents of buy_up_to_orders relative on the speed at which the threads in the pool finish (and their number), meaning that the order in which they are resolved in GoodMarket::execute_orders will vary based on timing, meaning that deterministic lockstep will not hold for multiplayer?
Contributor
Author
There was a problem hiding this comment.
The market doesn't care about ordering.
45a7c59 to
1fac069
Compare
18d03f0 to
e396ef5
Compare
e396ef5 to
1e3a0c2
Compare
1fac069 to
8d985e8
Compare
1e3a0c2 to
fb5cc3e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on top of #739
Note updating adjecencies inside the country is commented out.
This really should've never been placed there as recalculating it is expensive and can't be multithreaded easily.
Also the outcome rarely changes. It can only change when provinces change owner or our capital changes province.