Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove pretick argument from Activity.Queue() #16349

Merged
merged 1 commit into from Mar 24, 2019

Conversation

@obrakmann
Copy link
Contributor

commented Mar 24, 2019

Pre-ticking makes sense for child activities, since they basically run concurrently to their parents. Next activities, however, should not run in parallel but strictly in sequence.

If pretick was set, you could end up with the following sequence of events, which would run counter to general expectations:

A.Tick()
A.Tick()
A.Queue(self, new B(), true)
B.OnFirstRun()
B.Tick()
A.Tick()
A.Tick()
A.OnLastRun()
B.Tick()

Therefore the pretick argument to Activity.Queue() should be removed again.

Remove pretick argument from Activity.Queue()
Pre-ticking a next activity would break the assumption that activities
in a queue would be processed in sequence.
@pchote
pchote approved these changes Mar 24, 2019

@pchote pchote merged commit 44ca01d into OpenRA:bleed Mar 24, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@obrakmann obrakmann deleted the obrakmann:remove_activity_queue_pretick branch Mar 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.