Skip to content

One single global stateless OnCompleted Notification object #662

Closed
@samuelgruetter

Description

@samuelgruetter

Instead of creating a new OnCompleted Notification object every time we need one, we could have one global instance, accessible by a factory method on Notification (suggested by @akarnokd here).

Advantages:

  1. Better performance, since fewer object (=garbage) creation
  2. Scala adaptor could have an object OnCompleted instead of a class OnCompleted which has to wrap a Java OnCompleted object.

Maybe we could also get 2) without any changes in Java, but then we might need to define clearly if the toScalaNotification/toJavaNotification methods have to preserve object identity, or only equals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions