Swiftpack.co - b9swift/MulticastDelegate as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
b9swift/MulticastDelegate
MulticastDelegate in a satisfied implementation.
.package(url: "https://github.com/b9swift/MulticastDelegate.git", from: "1.1.0")

B9MulticastDelegate

Swift Version Swift Package Manager Build Status

Multicast delegate is a delegate that can have more than one element in its invocation list.

Installation

Using Swift Package Manager or import manually.

你也可以使用 gitee 镜像

Features

  • NSHashTable free. It results better performance, support Liunx.
  • MulticastDelegate confirms Sequence, which means that lots of sequence features available.
  • Thread safe.
  • Other delightful details, eg: error handling optimization, debug log optimization.

Background

I'm a big fan of the multicast delegate. I have "invented" and used it since 2014.

As Swift’s ABI is stabilized, it's time to move a Swift improvment.

But I cannot find a satisfied implementation everywhere. So I write one.

Alternatives

  • jonasman/MulticastDelegate - Use NSHashTable. Operator overloading is not a good idea in my opinion, it is not intuitive and reduces readability. API does not meet design guidelines (Omit needless words).
  • elano50/MulticastDelegateKit - Use NSHashTable.
  • Kevin Lundberg's - Generic type should not be AnyObject. API does not meet design guidelines (Omit needless words).
  • Greg Read's - Missing dupracate check when adding. API does not meet design guidelines (Omit needless words). I dislike remove when invoking.
  • Ivan's - Missing dupracate check when adding. It is odd using an equatable weak wrapper to check duplicates.

GitHub

link
Stars: 1
Last commit: 6 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Related Packages

Release Notes

Thread safe
6 weeks ago

MulticastDelegate is thread safe now.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics