Contents

init(port:data:)

Creates a transaction coordinator using a Mach port reference and serialized data.

Declaration

init(port: mach_port_t, data: Data) throws

Parameters

  • port:

    A Mach port (mach_port_t) that references the coordinator.

  • data:

    The serialized data with which to reconstruct the coordinator.

Discussion

Use this initializer to reconstruct a transaction coordinator that your app serializes using encode(_:) in another process.

This method takes ownership of the Mach port send right, even if an error occurs; don’t use or deallocate the port after calling this method.

See Also

Sharing a transaction coordinator using Mach