Open
Conversation
lifning
reviewed
Sep 17, 2017
| message = await asyncio.get_event_loop().run_in_executor(None, self.bgThreadGetOutboundMemoryReads) | ||
| print("sending a message: {}".format(message)) | ||
| pprint.pprint(message) | ||
| visualization.textlog.log_text(f"Sending event with num {self.currentEventNumber}") |
Owner
There was a problem hiding this comment.
once we have 'smart' strategies we should describe what the event actually was here too
| messageString = await websocket.recv() | ||
| message = ast.literal_eval(messageString) | ||
| num = message.get('event_number', -1) | ||
| if num > self.currentEventNumber: |
Owner
There was a problem hiding this comment.
if it's more than 1 bigger, we might wanna log something as well... since we'll be skipping events and ignoring them if they do come in later. eventually we'll want a "catch-up" path. we might also want a buffer of some small number (3?) of events in case a few come in out of order, before resorting to skipping.
Owner
There was a problem hiding this comment.
alternatively we might decide to make the IGameSync unconditionally include every strategy's memory blocks in each update when any of them have changed, so skipping events is OK but the overall bandwidth is higher
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.
No description provided.