apple / swift-distributed-actors

Peer-to-peer cluster implementation for Swift Distributed Actors
https://apple.github.io/swift-distributed-actors/
Apache License 2.0
580 stars 54 forks source link

Cleanup boss hasActiveSingleton in cluster singleton #1129

Open ktoso opened 1 year ago

ktoso commented 1 year ago

Currently when a node dies and a singleton boss notices it, it looks for the new member and asks the boss if it is ready to accept messages.

We use

    // FIXME: would like to return `Act?` but can't via the generic combining with Codable: rdar://111664985 & https://github.com/apple/swift/issues/67090
    distributed func hasActiveSingleton() -> Bool {

for this, and could return the Act there when we fix https://github.com/apple/swift/issues/67090.