Skip to content

Fix message passing mutability issue #125

Description

@porkbrain

Describe the bug
When an event is fired and has two listeners they share a reference to a single instance.

Expected behaviour
Listeners should have separated instance references. The event should only be mutated by middleware. This might be easier to implement for messages as their payload gets serialized.

Maybe we could create a new class that extends Event such as CloneableEvent which will have an abstract method clone () -> CloneableEvent. The programmer still can use unsafe Event, but for libraries (and Exteranto events), CloneableEvent could be used.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions