---
title: MTLSharedEvent
framework: metal
role: symbol
role_heading: Protocol
path: metal/mtlsharedevent
---

# MTLSharedEvent

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

## Declaration

```swift
protocol MTLSharedEvent : MTLEvent
```

## Mentioned in

About synchronization events Synchronizing events across multiple devices or processes Synchronizing passes with a fence Understanding the Metal 4 core API

## Overview

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. tip: Start with an MTLEvent instance until you need to synchronize work with a task that runs on the CPU or another Metal device, because an MTLSharedEvent can add overhead that may affect your app’s performance. Create an MTLSharedEvent by calling the makeSharedEvent() method of an MTLDevice instance. To pass this event to another process: Create a handle to the shared event by calling the makeSharedEventHandle() method. Transfer the handle to another process with XPC. From the other process, call the makeSharedEvent(handle:) method. For more information about shared events and synchronizing memory operations to resources, see: Synchronizing events across multiple devices or processes Synchronizing events between a GPU and the CPU. Resource synchronization

## Topics

### Synchronizing a shareable event

- [signaledValue](metal/mtlsharedevent/signaledvalue.md)
- [notify(_:atValue:block:)](metal/mtlsharedevent/notify(_:atvalue:block:).md)

### Creating a shared event handle

- [makeSharedEventHandle()](metal/mtlsharedevent/makesharedeventhandle().md)

### Instance Methods

- [valueSignaled(_:)](metal/mtlsharedevent/valuesignaled(_:).md)
- [wait(untilSignaledValue:timeoutMS:)](metal/mtlsharedevent/wait(untilsignaledvalue:timeoutms:).md)

## Relationships

### Inherits From

- [MTLEvent](metal/mtlevent.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Synchronizing with events

- [Implementing a multistage image filter using heaps and events](metal/implementing-a-multistage-image-filter-using-heaps-and-events.md)
- [About synchronization events](metal/about-synchronization-events.md)
- [Synchronizing events within a single device](metal/synchronizing-events-within-a-single-device.md)
- [Synchronizing events across multiple devices or processes](metal/synchronizing-events-across-multiple-devices-or-processes.md)
- [Synchronizing events between a GPU and the CPU](metal/synchronizing-events-between-a-gpu-and-the-cpu.md)
- [MTLEvent](metal/mtlevent.md)
- [MTLSharedEventHandle](metal/mtlsharedeventhandle.md)
- [MTLSharedEventListener](metal/mtlsharedeventlistener.md)
- [MTLSharedEventNotificationBlock](metal/mtlsharedeventnotificationblock.md)
