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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions