-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Add Two Phase Updates feature #273
Conversation
8c90e28
to
354f1ce
Compare
This is now a lot more reasonable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only comment I have for this is that right now, you can't have complex multiple interactions with this two phase commit system since it puts the commit immediately on top of the update event, and nothing can happen between them.
If that's intentional, it's a good sample of how to set up something like this, so don't feel that's a failing.
Only other comment attached, let me know and I can merge this.
examples/three_body.py
Outdated
if __name__ == "__main__": | ||
logging.basicConfig(level=logging.INFO) | ||
|
||
# Not good practice, https://github.com/ppb/pursuedpybear/issues/263 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can fix this now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually not, unless we include the entire kwargs block from __init__.py
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is improvable with #307
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#307 is merged, we can actually fix this now.
That was pretty much the idea? Everyone runs their simulations during The simplest usage would be Conway's Game of Life, written such that each cell performs its own logic. Each cell would run its simulation during the It did cross my mind to extend this to allow arbitrary phases, so you could have, for example, AI, Physics, and Commit phases. But this seemed like a good, solid start. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Holding until we fix the example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
bors r+
273: Add Two Phase Updates feature r=pathunstrom a=astronouth7303 Felt like writing a two-phase update system. This is so much easier to use with #263 that it's a soft requirement. This assumes that events signaled are queued and handled after all of the current event handlers are called. This skipped our usual discussion phase of things, where we debate designs first. Given that, feel free to completely rip this apart. Co-authored-by: Jamie Bliss <jamie@ivyleav.es>
Build succeeded
|
Felt like writing a two-phase update system.
This is so much easier to use with #263 that it's a soft requirement.
This assumes that events signaled are queued and handled after all of the current event handlers are called.
This skipped our usual discussion phase of things, where we debate designs first. Given that, feel free to completely rip this apart.