apple / swift-distributed-actors

Peer-to-peer cluster implementation for Swift Distributed Actors

Home Page:https://apple.github.io/swift-distributed-actors/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make LeaderElection.runElection async

ktoso opened this issue · comments

public protocol LeaderElection {
    /// Select a member to become a leader out of the existing `Membership`.
    ///
    /// Decisions about electing/selecting a leader may be performed asynchronously.
    mutating func runElection(context: LeaderElectionContext, membership: Cluster.Membership) -> LeaderElectionResult
}

should be async