---
title: unownedTaskExecutor
framework: swift
role: symbol
role_heading: Instance Property
path: swift/unsafecurrenttask/unownedtaskexecutor
---

# unownedTaskExecutor

The current TaskExecutor preference, if this task has one configured.

## Declaration

```swift
var unownedTaskExecutor: UnownedTaskExecutor? { get }
```

## Discussion

Discussion The executor may be used to compare for equality with an expected executor preference. The lifetime of an executor is not guaranteed by an UnownedTaskExecutor, so accessing it must be handled with great case – and the program must use other means to guarantee the executor remains alive while it is in use.
