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

Added Fixedupdate Handler #617

Merged
merged 3 commits into from
Mar 3, 2015
Merged

Added Fixedupdate Handler #617

merged 3 commits into from
Mar 3, 2015

Conversation

erendrake
Copy link
Member

This is ready to be merged

private readonly Dictionary<IUpdateObserver, int> observers = new Dictionary<IUpdateObserver, int>();

private readonly HashSet<IUpdateObserver> observers = new HashSet<IUpdateObserver>();
private readonly HashSet<IUpdateObserver> fixedObservers = new HashSet<IUpdateObserver>();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am assuming you were using a dictionary before to Assert a unique constraint? A hashset should do the same without throwing an exception :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was searching the .net docs for something like a hash and could't find it and gave up and used Dictionary.

@Dunbaratu
Copy link
Member

Looks good. Now that this is here we can seriously consider what happens if we move CPU update to fixedupdate (or just try it and see what happens).

Once we do that step, we'll have to dig through a lot of the docs and make sure they stop talking about stuff happening during Update.

Dunbaratu added a commit that referenced this pull request Mar 3, 2015
@Dunbaratu Dunbaratu merged commit a9fc6f7 into KSP-KOS:develop Mar 3, 2015
@erendrake erendrake deleted the fixed_update branch March 21, 2015 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants