Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

EventDispatcher upgraded for threadsafe usage #74 #75

Closed
wants to merge 1 commit into from
Closed

EventDispatcher upgraded for threadsafe usage #74 #75

wants to merge 1 commit into from

Conversation

XIII-th
Copy link
Contributor

@XIII-th XIII-th commented Feb 3, 2018

This commit fix #74 issue

@czyzby
Copy link
Owner

czyzby commented Feb 3, 2018

Removal from array lists is noticeably slower than from sets/linked lists (during iteration). This is likely to be a premature optimization and won't be an issue unless someone builds the whole app around Autumn events, but I feel the SnapshotArray is not the right collection to solve this. I'll look into your pull request more thoroughly before the next release though.

@XIII-th
Copy link
Contributor Author

XIII-th commented Feb 3, 2018

@czyzby right. Removal via iterations it't bottleneck of this solution, but I'm using Autumn more than four months in my game and I don't found at least one case for automatically event/message listener removing. Event/message listeners is used for user interactions, networking, and even for realtime game rules checks.

I realy think, automatical removing of events/message listeners - it's something really specific. Developer can manually do this via removeListener() if need it.

This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Autumn] Multithreaded access to EventDispatcher
2 participants