---
title: "init(target:selector:object:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/thread/init(target:selector:object:)"
---

# init(target:selector:object:)

Returns an NSThread object initialized with the given arguments.

## Declaration

```swift
convenience init(target: Any, selector: Selector, object argument: Any?)
```

## Parameters

- `target`: The object to which the message specified by selector is sent.
- `selector`: The selector for the message to send to target. This selector must take only one argument and must not have a return value.
- `argument`: The single argument passed to the target. May be nil.

## Return Value

Return Value An NSThread object initialized with the given arguments.

## Discussion

Discussion The objects target and argument are retained during the execution of the detached thread. They are released when the thread finally exits.

## See Also

### Related Documentation

- [start()](foundation/thread/start().md)

### Initializing an NSThread Object

- [init()](foundation/thread/init().md)
