Emitter
https://in-kotlin.com/design-patterns/observer/
Uses CopyOnWriteArrayList internally so that concurrent calls to attach from multiple threads cannot lose subscriptions, and emit iteration is safe even if a subscriber calls detach during the callback. Subscribers are expected to attach before simulation starts and detach after it ends; dynamic mid-run subscription is not supported.
Types
Link copied to clipboard
class Connection