Instance Method


Requests ownership of the entity.


func requestOwnership(timeout: TimeInterval = 15, _ callback: @escaping (SynchronizationComponent.OwnershipTransferCompletionResult) -> Void)



A time in seconds to wait before giving up.


A closure that the method calls when the request completes or times out.


Requesting ownership isn’t guaranteed to succeed.

See Also

Synchronizing an Entity Among Peers

var synchronization: SynchronizationComponent?

The entity’s synchronization component.

struct SynchronizationComponent

A component that synchronizes an entity between processes and networked applications.

var isOwner: Bool

A Boolean that indicates whether the calling process owns the entity.

func withUnsynchronized(() -> Void)

Calls the given closure in a way such that component changes that the closure makes don’t trigger synchronization.

protocol HasSynchronization

An interface that enables an entity to be synchronized between processes and networked applications.