Contents

MTLSharedEvent

A type that synchronizes memory operations to one or more resources across multiple CPUs, GPUs, and processes.

Declaration

protocol MTLSharedEvent : MTLEvent

Mentioned in

Overview

The MTLSharedEvent protocol inherits the MTLEvent protocol. An event can only synchronize memory operations that run on a single Metal device. A shared event can synchronize memory operations across multiple Metal devices and the CPU. Shared events work anywhere you can work with a regular event.

Create an MTLSharedEvent by calling the makeSharedEvent() method of an MTLDevice instance.

To pass this event to another process:

  1. Create a handle to the shared event by calling the makeSharedEventHandle() method.

  2. Transfer the handle to another process with XPC.

  3. From the other process, call the makeSharedEvent(handle:) method.

For more information about shared events and synchronizing memory operations to resources, see:

Topics

Synchronizing a shareable event

Creating a shared event handle

Instance Methods

See Also

Synchronizing with events