Contents

init(_:)

Initializes a GPU worker feature with a handler factory.

Declaration

init(_ handlerFactory: @escaping  @Sendable () -> any AccessoryFeatureSessionHandler<AccessoryGPUWorker.Session>)

Parameters

  • handlerFactory:

    A closure that creates the handler for each session of the feature.

Discussion

Create the instance inside your data provider extension’s extensionPoint. The system calls the closure to create a new handler for each session. For more information, see Sending data to an accessory in the background.